PHP 클래스 Embera\Providers\Facebook

상속: extends Embera\Adapters\Service
파일 보기 프로젝트 열기: mpratt/embera

보호된 프로퍼티들

프로퍼티 타입 설명
$apiUrl inline {@inheritdoc} This Provider is kind of special, because it uses different oembed endpoints based on the given url. The default value of the endpoint is null and is set during the process of getting the url information.
$postPatterns Patterns that match posts urls
$videoPatterns Patterns that match video urls

공개 메소드들

메소드 설명
getInfo ( ) inline {@inheritdoc}

보호된 메소드들

메소드 설명
modifyResponse ( array $response = [] ) inline {@inheritdoc}
urlMatchesPattern ( array $patternList ) : boolean Checks if $this->url matches the given list of patterns
validateUrl ( ) inline {@inheritdoc}

메소드 상세

getInfo() 공개 메소드

Im overriding this method because I need to set the endpoint based on the given url. By default we're always assuming it is a post url unless we have a specific video match. Why? Because we already did url validation and We dont want to loop over both sets of patterns all over again right? So we just need to loop over the smaller one ;)
public getInfo ( )

modifyResponse() 보호된 메소드

Need to modify the html response, to use the iframe instead. The html returned by facebook always adds the javascript code and the famous
. When embedding multiple links, the code seems to conflict and doesnt embed properly
protected modifyResponse ( array $response = [] )
$response array

urlMatchesPattern() 보호된 메소드

Checks if $this->url matches the given list of patterns
protected urlMatchesPattern ( array $patternList ) : boolean
$patternList array Array with regex
리턴 boolean

validateUrl() 보호된 메소드

inline {@inheritdoc}
protected validateUrl ( )

프로퍼티 상세

$apiUrl 보호되어 있는 프로퍼티

inline {@inheritdoc} This Provider is kind of special, because it uses different oembed endpoints based on the given url. The default value of the endpoint is null and is set during the process of getting the url information.
protected $apiUrl

$postPatterns 보호되어 있는 프로퍼티

Patterns that match posts urls
protected $postPatterns

$videoPatterns 보호되어 있는 프로퍼티

Patterns that match video urls
protected $videoPatterns