PHP 클래스 Zendesk\API\Resources\ResourceAbstract

상속: use trait Zendesk\API\Traits\Utility\ChainedParametersTrait
파일 보기 프로젝트 열기: zendesk/zendesk_api_client_php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$additionalRouteParams array
$apiBasePath string
$client Zendesk\API\HttpClient
$lastId integer
$objectName String
$objectNamePlural String
$resourceName String
$routes array

공개 메소드들

메소드 설명
__construct ( HttpClient $client )
getAdditionalRouteParams ( ) : array
getLastId ( ) : integer Saves an id for future methods in the chain
getResourceName ( ) : String
getRoute ( $name, array $params = [] ) : mixed Returns a route and replaces tokenized parts of the string with the passed params
getRoutes ( ) : array Return all routes for this resource
getValidSubResources ( ) : array This returns the valid relations of this resource. Definition of what is allowed to chain after this resource.
hasAnyKey ( array $params, array $mandatory ) : boolean Check that any parameter has been supplied
hasKeys ( array $params, array $mandatory ) : boolean Check that all parameters have been supplied
setAdditionalRouteParams ( array $additionalRouteParams )
setLastId ( integer $id ) Saves an id for future methods in the chain
setRoute ( $name, $route ) Add or override an existing route
setRoutes ( array $routes ) Wrapper for adding multiple routes via setRoute
sideload ( array $fields = [] ) Enable side-loading (beta) - flags until the next chain

보호된 메소드들

메소드 설명
getResourceNameFromClass ( ) : string Return the resource name using the name of the class (used for endpoints)
setUpRoutes ( ) Sets up the available routes for the resource.

메소드 상세

__construct() 공개 메소드

public __construct ( HttpClient $client )
$client Zendesk\API\HttpClient

getAdditionalRouteParams() 공개 메소드

public getAdditionalRouteParams ( ) : array
리턴 array

getLastId() 공개 메소드

Saves an id for future methods in the chain
public getLastId ( ) : integer
리턴 integer

getResourceName() 공개 메소드

public getResourceName ( ) : String
리턴 String

getResourceNameFromClass() 보호된 메소드

Return the resource name using the name of the class (used for endpoints)
protected getResourceNameFromClass ( ) : string
리턴 string

getRoute() 공개 메소드

Returns a route and replaces tokenized parts of the string with the passed params
public getRoute ( $name, array $params = [] ) : mixed
$name
$params array
리턴 mixed

getRoutes() 공개 메소드

Return all routes for this resource
public getRoutes ( ) : array
리턴 array

getValidSubResources() 공개 정적인 메소드

Make sure to add in this method when adding new sub resources. Example: $client->ticket()->comments(); Where ticket would have a comments as a valid sub resource. The array would look like: ['comments' => '\Zendesk\API\Resources\TicketComments']
public static getValidSubResources ( ) : array
리턴 array

hasAnyKey() 공개 메소드

Check that any parameter has been supplied
public hasAnyKey ( array $params, array $mandatory ) : boolean
$params array
$mandatory array
리턴 boolean

hasKeys() 공개 메소드

Check that all parameters have been supplied
public hasKeys ( array $params, array $mandatory ) : boolean
$params array
$mandatory array
리턴 boolean

setAdditionalRouteParams() 공개 메소드

public setAdditionalRouteParams ( array $additionalRouteParams )
$additionalRouteParams array

setLastId() 공개 메소드

Saves an id for future methods in the chain
public setLastId ( integer $id )
$id integer

setRoute() 공개 메소드

Add or override an existing route
public setRoute ( $name, $route )
$name
$route

setRoutes() 공개 메소드

Wrapper for adding multiple routes via setRoute
public setRoutes ( array $routes )
$routes array

setUpRoutes() 보호된 메소드

Sets up the available routes for the resource.
protected setUpRoutes ( )

sideload() 공개 메소드

Enable side-loading (beta) - flags until the next chain
public sideload ( array $fields = [] )
$fields array

프로퍼티 상세

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

protected array $additionalRouteParams
리턴 array

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

protected string $apiBasePath
리턴 string

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

protected HttpClient,Zendesk\API $client
리턴 Zendesk\API\HttpClient

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

protected int $lastId
리턴 integer

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

protected String $objectName
리턴 String

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

protected String $objectNamePlural
리턴 String

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

protected String $resourceName
리턴 String

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

protected array $routes
리턴 array