PHP 클래스 Pantheon\Terminus\Models\TerminusModel

상속: implements Pantheon\Terminus\Request\RequestAwareInterface, use trait Pantheon\Terminus\Request\RequestAwareTrait
파일 보기 프로젝트 열기: pantheon-systems/terminus 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$id string

보호된 프로퍼티들

프로퍼티 타입 설명
$args Arguments for fetching this model's information
$attributes object
$url The URL at which to fetch this model's information

공개 메소드들

메소드 설명
__construct ( object $attributes = null, array $options = [] ) Object constructor
fetch ( array $args = [] ) : TerminusModel Fetches this object from Pantheon
get ( string $attribute ) : mixed Retrieves attribute of given name
getUrl ( ) : string Get the URL for this model
has ( string $attribute ) : boolean Checks whether the model has an attribute
set ( string $attribute, mixed $value ) Sets an attribute

보호된 메소드들

메소드 설명
parseAttributes ( object $data ) : object Modify response data between fetch and assignment

메소드 상세

__construct() 공개 메소드

Object constructor
public __construct ( object $attributes = null, array $options = [] )
$attributes object Attributes of this model
$options array Options with which to configure this model

fetch() 공개 메소드

Fetches this object from Pantheon
public fetch ( array $args = [] ) : TerminusModel
$args array Params to pass to request
리턴 TerminusModel $this

get() 공개 메소드

Retrieves attribute of given name
public get ( string $attribute ) : mixed
$attribute string Name of the key of the desired attribute
리턴 mixed Value of the attribute, or null if not set.

getUrl() 공개 메소드

Get the URL for this model
public getUrl ( ) : string
리턴 string

has() 공개 메소드

Checks whether the model has an attribute
public has ( string $attribute ) : boolean
$attribute string Name of the attribute key
리턴 boolean True if attribute exists, false otherwise

parseAttributes() 보호된 메소드

Modify response data between fetch and assignment
protected parseAttributes ( object $data ) : object
$data object attributes received from API response
리턴 object $data

set() 공개 메소드

Sets an attribute
public set ( string $attribute, mixed $value )
$attribute string Name of the attribute key
$value mixed The value to assign to the attribute

프로퍼티 상세

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

Arguments for fetching this model's information
protected $args

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

protected object $attributes
리턴 object

$id 공개적으로 프로퍼티

public string $id
리턴 string

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

The URL at which to fetch this model's information
protected $url