PHP Class DirkGroenen\Pinterest\Models\Model

Inheritance: implements JsonSerializable
Datei anzeigen Open project: dirkgroenen/pinterest-api-php

Protected Properties

Property Type Description
$attributes array The model's attributes
$fillable array The available object keys
$master DirkGroenen\Pinterest\Pinterest Instance of the master Pinterest class

Public Methods

Method Description
__construct ( Pinterest $master, mixed $modeldata = null ) Create a new model instance
__get ( string $key ) : mixed Get the model's attribute
__isset ( $key ) : boolean Check if the model's attribute is set
__set ( string $key, mixed $value ) : void Set the model's attribute
__toString ( ) : string Convert the model to its string representation
isFillable ( string $key ) : boolean Check if the key is fillable
jsonSerialize ( ) : array Convert the object into something JSON serializable.
toArray ( ) : array Convert the model instance to an array
toJson ( ) : string Convert the model instance to JSON

Private Methods

Method Description
fill ( array $attributes ) : void Fill the attributes

Method Details

__construct() public method

Create a new model instance
public __construct ( Pinterest $master, mixed $modeldata = null )
$master DirkGroenen\Pinterest\Pinterest
$modeldata mixed

__get() public method

Get the model's attribute
public __get ( string $key ) : mixed
$key string
return mixed

__isset() public method

Check if the model's attribute is set
public __isset ( $key ) : boolean
$key
return boolean

__set() public method

Set the model's attribute
public __set ( string $key, mixed $value ) : void
$key string
$value mixed
return void

__toString() public method

Convert the model to its string representation
public __toString ( ) : string
return string

isFillable() public method

Check if the key is fillable
public isFillable ( string $key ) : boolean
$key string
return boolean

jsonSerialize() public method

Convert the object into something JSON serializable.
public jsonSerialize ( ) : array
return array

toArray() public method

Convert the model instance to an array
public toArray ( ) : array
return array

toJson() public method

Convert the model instance to JSON
public toJson ( ) : string
return string

Property Details

$attributes protected_oe property

The model's attributes
protected array $attributes
return array

$fillable protected_oe property

The available object keys
protected array $fillable
return array

$master protected_oe property

Instance of the master Pinterest class
protected Pinterest,DirkGroenen\Pinterest $master
return DirkGroenen\Pinterest\Pinterest