PHP Trait TORM\Persistence

Show file Open project: taq/torm

Public Methods

Method Description
destroy ( ) : boolean Destroy the current object
save ( boolean $force = false ) : boolean Save or update currenct object
updateAttributes ( mixed $attrs ) : updated Update object attributes

Private Methods

Method Description
_insert ( mixed $attrs, string $calling, string $pk, mixed $pk_value ) : inserted Insert a new record
_update ( mixed $attrs, string $calling, string $pk, mixed $pk_value ) : boolean Update a record

Method Details

destroy() public method

Destroy the current object
public destroy ( ) : boolean
return boolean destroyed or not

save() public method

Save or update currenct object
public save ( boolean $force = false ) : boolean
$force boolean to force saving
return boolean saved/updated

updateAttributes() public method

Update object attributes
public updateAttributes ( mixed $attrs ) : updated
$attrs mixed attributes
return updated or not