PHP 클래스 seregazhuk\PinterestBot\Api\ProvidersContainer

상속: implements seregazhuk\PinterestBot\Contracts\ProvidersContainerInterface
파일 보기 프로젝트 열기: seregazhuk/php-pinterest-bot 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$providers array A array containing the cached providers.
$request Request References to the request that travels through the application.
$response Response

공개 메소드들

메소드 설명
__construct ( Request $request, Response $response )
getClientInfo ( ) : array | null Simply proxies call to Response object.
getHttpClient ( ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient Returns HttpClient object for setting user-agent string or other CURL available options.
getLastError ( ) : string | null Proxies call to Request object and returns message from the error object.
getProvider ( string $provider ) : Provider Gets provider object by name. If there is no such provider in providers array, it will try to create it, then save it, and then return.

보호된 메소드들

메소드 설명
addProvider ( string $provider ) Creates provider by class name, and if success saves it to providers array. Provider class must exist in PROVIDERS_NAMESPACE.
buildProvider ( string $className ) : object Build Provider object with reflection API.
resolveProviderClass ( $provider ) : string

메소드 상세

__construct() 공개 메소드

public __construct ( Request $request, Response $response )
$request Request
$response Response

addProvider() 보호된 메소드

Creates provider by class name, and if success saves it to providers array. Provider class must exist in PROVIDERS_NAMESPACE.
protected addProvider ( string $provider )
$provider string

buildProvider() 보호된 메소드

Build Provider object with reflection API.
protected buildProvider ( string $className ) : object
$className string
리턴 object

getClientInfo() 공개 메소드

Simply proxies call to Response object.
public getClientInfo ( ) : array | null
리턴 array | null

getHttpClient() 공개 메소드

Returns HttpClient object for setting user-agent string or other CURL available options.
public getHttpClient ( ) : seregazhuk\PinterestBot\Api\Contracts\HttpClient
리턴 seregazhuk\PinterestBot\Api\Contracts\HttpClient

getLastError() 공개 메소드

Proxies call to Request object and returns message from the error object.
public getLastError ( ) : string | null
리턴 string | null

getProvider() 공개 메소드

Gets provider object by name. If there is no such provider in providers array, it will try to create it, then save it, and then return.
public getProvider ( string $provider ) : Provider
$provider string
리턴 seregazhuk\PinterestBot\Api\Providers\Provider

resolveProviderClass() 보호된 메소드

protected resolveProviderClass ( $provider ) : string
$provider
리턴 string

프로퍼티 상세

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

A array containing the cached providers.
protected array $providers
리턴 array

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

References to the request that travels through the application.
protected Request,seregazhuk\PinterestBot\Api $request
리턴 Request

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

protected Response,seregazhuk\PinterestBot\Api $response
리턴 Response