PHP Класс Asvae\ApiTester\Entities\BaseEntity

Наследование: implements Illuminate\Contracts\Support\Arrayable, implements Illuminate\Contracts\Support\Jsonable, implements ArrayAcces\ArrayAccess, implements JsonSerializabl\JsonSerializable
Показать файл Открыть проект

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

Свойство Тип Описание
$attributes Entity attributes.
$fillable Names of attributes that can be filled.

Открытые методы

Метод Описание
__construct ( array $data = [] ) BaseEntity constructor.
fill ( array $data ) : void Fill attributes that can be filled.
jsonSerialize ( ) : mixed Specify data which should be serialized to JSON
offsetExists ( mixed $offset ) : boolean Whether a offset exists.
offsetGet ( mixed $offset ) : mixed Offset to retrieve.
offsetSet ( mixed $offset, mixed $value ) : void Offset to set.
offsetUnset ( mixed $offset ) : void Offset to unset.
toArray ( ) : array Get the instance as an array.
toJson ( integer $options ) : string Convert the object to its JSON representation.

Защищенные методы

Метод Описание
filterFillable ( array $data ) : array Return array with with key that can be filled.

Описание методов

__construct() публичный метод

BaseEntity constructor.
public __construct ( array $data = [] )
$data array

fill() публичный метод

Fill attributes that can be filled.
public fill ( array $data ) : void
$data array
Результат void

filterFillable() защищенный метод

Return array with with key that can be filled.
protected filterFillable ( array $data ) : array
$data array
Результат array

jsonSerialize() публичный метод

Specify data which should be serialized to JSON
С версии: 5.4.0
public jsonSerialize ( ) : mixed
Результат mixed data which can be serialized by json_encode, which is a value of any type other than a resource.

offsetExists() публичный метод

Whether a offset exists.
public offsetExists ( mixed $offset ) : boolean
$offset mixed An offset to check for.
Результат boolean true on success or false on failure.

offsetGet() публичный метод

Offset to retrieve.
public offsetGet ( mixed $offset ) : mixed
$offset mixed The offset to retrieve.
Результат mixed Can return all value types.

offsetSet() публичный метод

Offset to set.
public offsetSet ( mixed $offset, mixed $value ) : void
$offset mixed The offset to assign the value to.
$value mixed The value to set.
Результат void

offsetUnset() публичный метод

Offset to unset.
public offsetUnset ( mixed $offset ) : void
$offset mixed The offset to unset.
Результат void

toArray() публичный метод

Get the instance as an array.
public toArray ( ) : array
Результат array return array representation of object.

toJson() публичный метод

Convert the object to its JSON representation.
public toJson ( integer $options ) : string
$options integer
Результат string

Описание свойств

$attributes защищенное свойство

Entity attributes.
protected $attributes

$fillable защищенное свойство

Names of attributes that can be filled.
protected $fillable