PHP Class Asvae\ApiTester\Entities\BaseEntity

Inheritance: implements Illuminate\Contracts\Support\Arrayable, implements Illuminate\Contracts\Support\Jsonable, implements ArrayAcces\ArrayAccess, implements JsonSerializabl\JsonSerializable
Datei anzeigen Open project: asvae/laravel-api-tester

Protected Properties

Property Type Description
$attributes Entity attributes.
$fillable Names of attributes that can be filled.

Public Methods

Method Description
__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.

Protected Methods

Method Description
filterFillable ( array $data ) : array Return array with with key that can be filled.

Method Details

__construct() public method

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

fill() public method

Fill attributes that can be filled.
public fill ( array $data ) : void
$data array
return void

filterFillable() protected method

Return array with with key that can be filled.
protected filterFillable ( array $data ) : array
$data array
return array

jsonSerialize() public method

Specify data which should be serialized to JSON
public jsonSerialize ( ) : mixed
return mixed data which can be serialized by json_encode, which is a value of any type other than a resource.

offsetExists() public method

Whether a offset exists.
public offsetExists ( mixed $offset ) : boolean
$offset mixed An offset to check for.
return boolean true on success or false on failure.

offsetGet() public method

Offset to retrieve.
public offsetGet ( mixed $offset ) : mixed
$offset mixed The offset to retrieve.
return mixed Can return all value types.

offsetSet() public method

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.
return void

offsetUnset() public method

Offset to unset.
public offsetUnset ( mixed $offset ) : void
$offset mixed The offset to unset.
return void

toArray() public method

Get the instance as an array.
public toArray ( ) : array
return array return array representation of object.

toJson() public method

Convert the object to its JSON representation.
public toJson ( integer $options ) : string
$options integer
return string

Property Details

$attributes protected_oe property

Entity attributes.
protected $attributes

$fillable protected_oe property

Names of attributes that can be filled.
protected $fillable