Class Entity
Base class for custom entities
Methods summary
public
|
|
public
mixed
|
#
__get( string $name )
Returns value of given field
Returns value of given field
Parameters
Returns
mixed
Throws
|
public
|
#
__set( string $name, mixed $value )
Sets value of given field
Sets value of given field
Parameters
Throws
|
public
mixed
|
#
__call( string $name, array $arguments, array $arguments,… )
Try to call get<$name> method and calls __get($name) when get method doesn't exist
Try to call get<$name> method and calls __get($name) when get method doesn't exist
Parameters
- $name
- $arguments
- $arguments,…
Returns
mixed
Throws
|
public
|
#
assign( array $values, array $whitelist = null )
Performs a mass value assignment (using setters)
Performs a mass value assignment (using setters)
Parameters
|
public
boolean
|
#
isModified( )
Tells whether entity is in modified state
Tells whether entity is in modified state
Returns
boolean
|
public
boolean
|
#
isDetached( )
Tells whether entity is in detached state (like newly created entity)
Tells whether entity is in detached state (like newly created entity)
Returns
boolean
|
public
|
#
detach( )
Marks entity as detached (it means non-persisted)
Marks entity as detached (it means non-persisted)
|
public
array
|
#
getModifiedData( )
Returns array of modified fields with new values
Returns array of modified fields with new values
Returns
array
|
public
|
#
markAsUpdated( )
Marks entity as non-updated (isModified() returns false right after this method call)
Marks entity as non-updated (isModified() returns false right after this method call)
|
public
|
#
markAsCreated( integer $id, string $table, DibiConnection $connection )
Marks entity as persisted
Marks entity as persisted
Parameters
|