PHP Class Pantheon\Terminus\Models\TerminusModel

Inheritance: implements Pantheon\Terminus\Request\RequestAwareInterface, use trait Pantheon\Terminus\Request\RequestAwareTrait
Afficher le fichier Open project: pantheon-systems/terminus Class Usage Examples

Méthodes publiques

Свойство Type Description
$id string

Protected Properties

Свойство Type Description
$args Arguments for fetching this model's information
$attributes object
$url The URL at which to fetch this model's information

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
parseAttributes ( object $data ) : object Modify response data between fetch and assignment

Method Details

__construct() public méthode

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() public méthode

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

get() public méthode

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

getUrl() public méthode

Get the URL for this model
public getUrl ( ) : string
Résultat string

has() public méthode

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

parseAttributes() protected méthode

Modify response data between fetch and assignment
protected parseAttributes ( object $data ) : object
$data object attributes received from API response
Résultat object $data

set() public méthode

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

Property Details

$args protected_oe property

Arguments for fetching this model's information
protected $args

$attributes protected_oe property

protected object $attributes
Résultat object

$id public_oe property

public string $id
Résultat string

$url protected_oe property

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