PHP Class Isswp101\Persimmon\Model

Inheritance: implements Isswp101\Persimmon\Contracts\Arrayable, implements Isswp101\Persimmon\Contracts\Jsonable, implements Isswp101\Persimmon\Contracts\Stringable, implements JsonSerializabl\JsonSerializable, use trait Isswp101\Persimmon\Traits\Presentable, use trait Isswp101\Persimmon\Traits\Eventable, use trait Isswp101\Persimmon\Traits\Mergeable, use trait Isswp101\Persimmon\Traits\Idable, use trait Isswp101\Persimmon\Traits\Userable, use trait Isswp101\Persimmon\Traits\Timestampable, use trait Isswp101\Persimmon\Traits\Fillable, use trait Isswp101\Persimmon\Traits\Cacheable
Show file Open project: isswp101/elasticsearch-eloquent Class Usage Examples

Public Properties

Property Type Description
$_dal Isswp101\Persimmon\DAL\IDAL
$_exist boolean

Public Methods

Method Description
__clone ( ) Clone object.
__construct ( Isswp101\Persimmon\DAL\IDAL $dal, array $attributes = [] ) Create a new instance.
create ( array $attributes = [] ) : static Save a new model and return the instance.
createInstance ( ) : static Create a new instance.
delete ( ) : boolean Delete the model.
destroy ( mixed $id ) Destroy the models by the given id.
find ( mixed $id, array $columns = ['*'], array $options = [] ) : static Find a model by its primary key.
findOrFail ( mixed $id, array $columns = ['*'], integer $parent = null ) : static Find a model by its primary key or throw an exception.
findOrNew ( mixed $id ) : static Find a model by its primary key or return new model.
jsonSerialize ( )
save ( array $columns = ['*'] ) : boolean Save the model.
toArray ( )

Method Details

__clone() public method

Clone object.
public __clone ( )

__construct() public method

Create a new instance.
public __construct ( Isswp101\Persimmon\DAL\IDAL $dal, array $attributes = [] )
$dal Isswp101\Persimmon\DAL\IDAL
$attributes array

create() public static method

Save a new model and return the instance.
public static create ( array $attributes = [] ) : static
$attributes array
return static

createInstance() public static method

Create a new instance.
public static createInstance ( ) : static
return static

delete() public method

Delete the model.
public delete ( ) : boolean
return boolean

destroy() public static method

Destroy the models by the given id.
public static destroy ( mixed $id )
$id mixed

find() public static method

Find a model by its primary key.
public static find ( mixed $id, array $columns = ['*'], array $options = [] ) : static
$id mixed
$columns array
$options array
return static

findOrFail() public static method

Find a model by its primary key or throw an exception.
public static findOrFail ( mixed $id, array $columns = ['*'], integer $parent = null ) : static
$id mixed
$columns array
$parent integer
return static

findOrNew() public static method

Find a model by its primary key or return new model.
public static findOrNew ( mixed $id ) : static
$id mixed
return static

jsonSerialize() public method

public jsonSerialize ( )

save() public method

Save the model.
public save ( array $columns = ['*'] ) : boolean
$columns array
return boolean

toArray() public method

public toArray ( )

Property Details

$_dal public property

public IDAL,Isswp101\Persimmon\DAL $_dal
return Isswp101\Persimmon\DAL\IDAL

$_exist public property

public bool $_exist
return boolean