PHP Класс Pantheon\Terminus\Models\TerminusModel

Наследование: implements Pantheon\Terminus\Request\RequestAwareInterface, use trait Pantheon\Terminus\Request\RequestAwareTrait
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$id string

Защищенные свойства (Protected)

Свойство Тип Описание
$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