public function render($uri, $maxWidth = 0, $maxHeight = 0, $objectName = null)
    {
        $consumer = new Consumer();

        $this->prepareRequestParameters($maxWidth, $maxHeight, $consumer);

        $resourceObject = $consumer->consume($uri);

        if ($resourceObject !== null) {
            if ($objectName !== null) {
                if ($this->templateVariableContainer->exists($objectName)) {
                    throw new Exception('Object name for EmbedViewHelper given as: ' . htmlentities($objectName) . '. This variable name is already in use, choose another.', 1359969229);
                }
                $this->templateVariableContainer->add($objectName, $resourceObject);
                $html = $this->renderChildren();
                $this->templateVariableContainer->remove($objectName);
            } else {
                $html = $resourceObject->getAsString();
            }
        } else {
            $html = 'Invalid oEmbed Resource';
        }

        return $html;
    }
public function render($uri, $maxWidth = 0, $maxHeight = 0, $objectName = null)
    {
        $consumer = new Consumer();

        $this->prepareRequestParameters($maxWidth, $maxHeight, $consumer);

        $resourceObject = $consumer->consume($uri);

        if ($resourceObject !== null) {
            if ($objectName !== null) {
                if ($this->templateVariableContainer->exists($objectName)) {
                    throw new Exception('Object name for EmbedViewHelper given as: ' . htmlentities($objectName) . '. This variable name is already in use, choose another.', 1359969229);
                }
                $this->templateVariableContainer->add($objectName, $resourceObject);
                $html = $this->renderChildren();
                $this->templateVariableContainer->remove($objectName);
            } else {
                $html = $resourceObject->getAsString();
            }
        } else {
            $html = 'Invalid oEmbed Resource';
        }

        return $html;
    }
public function render ( $ uri , $ maxWidth = 0 , $ maxHeight = 0 , $ objectName = null ) { $ consumer = new Consumer ( ) ; $ this -> prepareRequestParameters ( $ maxWidth , $ maxHeight , $ consumer ) ; $ resourceObject = $ consumer -> consume ( $ uri ) ; if ( $ resourceObject !== null ) { if ( $ objectName !== null ) { if ( $ this -> templateVariableContainer -> exists ( $ objectName ) ) { throw new Exception ( 'Object name for EmbedViewHelper given as: ' . htmlentities ( $ objectName ) . '. This variable name is already in use, choose another.' , 1359969229 ) ; } $ this -> templateVariableContainer -> add ( $ objectName , $ resourceObject ) ; $ html = $ this -> renderChildren ( ) ; $ this -> templateVariableContainer -> remove ( $ objectName ) ; } else { $ html = $ resourceObject -> getAsString ( ) ; } } else { $ html = 'Invalid oEmbed Resource' ; } return $ html ; }
Renders a representation of a oEmbed resource

@param string $uri
@param integer $maxWidth
@param integer $maxHeight
@param string $objectName
@return string
@throws Exception
Renders a representation of a oEmbed resource