PHP 클래스 Facebook\InstantArticles\Elements\InstantArticle

...
...

...

상속: extends Element, implements Facebook\InstantArticles\Elements\Container, implements Facebook\InstantArticles\Elements\InstantArticleInterface
파일 보기 프로젝트 열기: facebook/facebook-instant-articles-sdk-php 1 사용 예제들

공개 메소드들

메소드 설명
addChild ( Element $child ) Adds new child elements to this InstantArticle
addMetaProperty ( string $property_name, string $property_content ) Adds a meta property for the of Instant Article.
create ( ) : InstantArticle Factory method
disableAutomaticAdPlacement ( ) Use the strategy of manual ad placement
disableRTL ( ) Updates article to use LTR orientation (default), disabling RTL.
enableAutomaticAdPlacement ( ) Use the strategy of auto ad placement
enableRTL ( ) Updates article to use RTL orientation.
getCanonicalURL ( ) : string
getChildren ( ) : array
getContainerChildren ( )
getFooter ( ) : Facebook\InstantArticles\Elements\Footer
getHeader ( ) : Facebook\InstantArticles\Elements\Header
isValid ( )
render ( $doctype = '<!doctype html>', $format = false )
toDOMElement ( $document = null )
unshiftChild ( $child ) Adds new child elements to the front of this InstantArticle
withCanonicalURL ( string $url ) Sets the canonical URL for the Instant Article. It is REQUIRED.
withCharset ( string $charset ) Sets the charset for the Instant Article. utf-8 by default.
withFooter ( Facebook\InstantArticles\Elements\Footer $footer ) Sets the footer content to this InstantArticle
withHeader ( Facebook\InstantArticles\Elements\Header $header ) Sets the header content to this InstantArticle
withStyle ( string $style ) Sets the style to be applied to this Instant Article

비공개 메소드들

메소드 설명
__construct ( ) : InstantArticle Private constructor. It must be used the Factory method
createMetaElement ( $document, $property_name, $property_content )

메소드 상세

addChild() 공개 메소드

Adds new child elements to this InstantArticle
public addChild ( Element $child )
$child Element to be added to this Article.

addMetaProperty() 공개 메소드

Adds a meta property for the of Instant Article.
public addMetaProperty ( string $property_name, string $property_content )
$property_name string name of meta attribute
$property_content string content of meta attribute

create() 공개 정적인 메소드

Factory method
public static create ( ) : InstantArticle
리턴 InstantArticle object.

disableAutomaticAdPlacement() 공개 메소드

Use the strategy of manual ad placement

disableRTL() 공개 메소드

Updates article to use LTR orientation (default), disabling RTL.
public disableRTL ( )

enableAutomaticAdPlacement() 공개 메소드

Use the strategy of auto ad placement

enableRTL() 공개 메소드

Updates article to use RTL orientation.
public enableRTL ( )

getCanonicalURL() 공개 메소드

public getCanonicalURL ( ) : string
리턴 string canonicalURL from the InstantArticle

getChildren() 공개 메소드

public getChildren ( ) : array
리턴 array

getContainerChildren() 공개 메소드

getFooter() 공개 메소드

public getFooter ( ) : Facebook\InstantArticles\Elements\Footer
리턴 Facebook\InstantArticles\Elements\Footer footer element from the InstantArticle

getHeader() 공개 메소드

public getHeader ( ) : Facebook\InstantArticles\Elements\Header
리턴 Facebook\InstantArticles\Elements\Header header element from the InstantArticle

isValid() 공개 메소드

public isValid ( )

render() 공개 메소드

public render ( $doctype = '<!doctype html>', $format = false )

toDOMElement() 공개 메소드

public toDOMElement ( $document = null )

unshiftChild() 공개 메소드

Adds new child elements to the front of this InstantArticle
public unshiftChild ( $child )

withCanonicalURL() 공개 메소드

Sets the canonical URL for the Instant Article. It is REQUIRED.
public withCanonicalURL ( string $url )
$url string The canonical url of article. Ie: http://domain.com/article.html

withCharset() 공개 메소드

Sets the charset for the Instant Article. utf-8 by default.
public withCharset ( string $charset )
$charset string The charset of article. Ie: "iso-8859-1"

withFooter() 공개 메소드

Sets the footer content to this InstantArticle
public withFooter ( Facebook\InstantArticles\Elements\Footer $footer )
$footer Facebook\InstantArticles\Elements\Footer to be added to this Article.

withHeader() 공개 메소드

Sets the header content to this InstantArticle
public withHeader ( Facebook\InstantArticles\Elements\Header $header )
$header Facebook\InstantArticles\Elements\Header to be added to this Article.

withStyle() 공개 메소드

Sets the style to be applied to this Instant Article
public withStyle ( string $style )
$style string Name of the style