PHP 클래스 Embera\Providers

파일 보기 프로젝트 열기: mpratt/embera

보호된 프로퍼티들

프로퍼티 타입 설명
$config Configuration Settings
$customParams Custom parameters for each host/provider
$oembed instance of \Embera\Oembed
$services Massive array with the mapping of host -> provider class relation.
$wildCardHosts Hosts with wildcards, calculated at runtime

공개 메소드들

메소드 설명
__construct ( array $config = [], Embera\Oembed $oembed ) : void Construct
addProvider ( string $host, string | object $class, array $params = [] ) : void Adds a new Provider into the service map
getAll ( array | string $urls ) : array Returns an array with all valid services found.

보호된 메소드들

메소드 설명
extractCustomParams ( array $params = [] ) : array Extracts custom parameters for a Provider
findServices ( array $urls = [] ) : array Finds services for the given $urls.
getHost ( string $url ) : string Gets a normalized host for the given $url

메소드 상세

__construct() 공개 메소드

Construct
public __construct ( array $config = [], Embera\Oembed $oembed ) : void
$config array Associative array with configuration options
$oembed Embera\Oembed Instance of \Embera\Oembed
리턴 void

addProvider() 공개 메소드

Adds a new Provider into the service map
public addProvider ( string $host, string | object $class, array $params = [] ) : void
$host string The host for the map
$class string | object The class or object that should manage the provider
$params array Custom parameters that should be sent in the url for this Provider
리턴 void

extractCustomParams() 보호된 메소드

Extracts custom parameters for a Provider
protected extractCustomParams ( array $params = [] ) : array
$params array
리턴 array

findServices() 보호된 메소드

Finds services for the given $urls.
protected findServices ( array $urls = [] ) : array
$urls array An array with all the available urls
리턴 array An Array with loaded services

getAll() 공개 메소드

Returns an array with all valid services found.
public getAll ( array | string $urls ) : array
$urls array | string An array with urls or a url string
리턴 array

getHost() 보호된 메소드

Gets a normalized host for the given $url
protected getHost ( string $url ) : string
$url string
리턴 string

프로퍼티 상세

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

Configuration Settings
protected $config

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

Custom parameters for each host/provider
protected $customParams

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

instance of \Embera\Oembed
protected $oembed

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

Massive array with the mapping of host -> provider class relation.
protected $services

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

Hosts with wildcards, calculated at runtime
protected $wildCardHosts