PHP Interface Nextras\Orm\Entity\IEntity

Inheritance: extends Serializabl\Serializable
Afficher le fichier Open project: nextras/orm Interface Usage Examples

Méthodes publiques

Méthode Description
fireEvent ( string $method, array $args = [] ) Fires event.
getMetadata ( ) : EntityMetadata Returns entity metadata.
getModel ( boolean $need = true ) : Nextras\Orm\Model\IModel Returns entity model.
getPersistedId ( ) : mixed Returns persisted primary value.
getPreloadContainer ( ) : Nextras\Orm\Collection\IEntityPreloadContainer
getProperty ( string $name ) : mixed | Nextras\Orm\Entity\IPropertyContainer Returns property contents.
getRawProperty ( string $name ) : mixed Returns property raw contents.
getRawValue ( string $name ) : mixed Returns raw value.
getRepository ( boolean $need = true ) : Nextras\Orm\Repository\IRepository | null Returns entity repository.
getValue ( string $name ) : mixed Returns value.
hasValue ( string $name ) : boolean Returns true if property has a value (not null).
isAttached ( ) : boolean Returns true if entity is attached to its repository.
isModified ( string $name = null ) : boolean Returns true if the entity is modiefied or the column $name is modified.
isPersisted ( ) : boolean Returns true if entity is persisted.
setAsModified ( string $name = null ) : self Sets the entity or the column as modified.
setPreloadContainer ( Nextras\Orm\Collection\IEntityPreloadContainer $overIterator = null ) Sets the collection of entites for the loading relations at once.
setRawValue ( string $name, mixed $value ) Sets raw value.
setReadOnlyValue ( string $name, mixed $value ) : self Sets read-only value.
setValue ( string $name, mixed $value ) : self Sets property value.
toArray ( integer $mode = self::TO_ARRAY_RELATIONSHIP_AS_IS ) : array Converts entity to array.

Method Details

fireEvent() public méthode

Fires event.
public fireEvent ( string $method, array $args = [] )
$method string
$args array

getMetadata() public méthode

Returns entity metadata.
public getMetadata ( ) : EntityMetadata
Résultat Nextras\Orm\Entity\Reflection\EntityMetadata

getModel() public méthode

Returns entity model.
public getModel ( boolean $need = true ) : Nextras\Orm\Model\IModel
$need boolean
Résultat Nextras\Orm\Model\IModel

getPersistedId() public méthode

Returns persisted primary value.
public getPersistedId ( ) : mixed
Résultat mixed

getPreloadContainer() public méthode

public getPreloadContainer ( ) : Nextras\Orm\Collection\IEntityPreloadContainer
Résultat Nextras\Orm\Collection\IEntityPreloadContainer

getProperty() public méthode

Returns property contents.
public getProperty ( string $name ) : mixed | Nextras\Orm\Entity\IPropertyContainer
$name string
Résultat mixed | Nextras\Orm\Entity\IPropertyContainer

getRawProperty() public méthode

Returns property raw contents.
public getRawProperty ( string $name ) : mixed
$name string
Résultat mixed

getRawValue() public méthode

Raw value is normalized value which is suitable unique identification and storing.
public getRawValue ( string $name ) : mixed
$name string
Résultat mixed

getRepository() public méthode

Returns entity repository.
public getRepository ( boolean $need = true ) : Nextras\Orm\Repository\IRepository | null
$need boolean
Résultat Nextras\Orm\Repository\IRepository | null

getValue() public méthode

Returns value.
public getValue ( string $name ) : mixed
$name string
Résultat mixed

hasValue() public méthode

Returns true if property has a value (not null).
public hasValue ( string $name ) : boolean
$name string
Résultat boolean

isAttached() public méthode

Returns true if entity is attached to its repository.
public isAttached ( ) : boolean
Résultat boolean

isModified() public méthode

Returns true if the entity is modiefied or the column $name is modified.
public isModified ( string $name = null ) : boolean
$name string
Résultat boolean

isPersisted() public méthode

Returns true if entity is persisted.
public isPersisted ( ) : boolean
Résultat boolean

setAsModified() public méthode

Sets the entity or the column as modified.
public setAsModified ( string $name = null ) : self
$name string
Résultat self

setPreloadContainer() public méthode

Sets the collection of entites for the loading relations at once.
public setPreloadContainer ( Nextras\Orm\Collection\IEntityPreloadContainer $overIterator = null )
$overIterator Nextras\Orm\Collection\IEntityPreloadContainer

setRawValue() public méthode

Sets raw value.
public setRawValue ( string $name, mixed $value )
$name string
$value mixed

setReadOnlyValue() public méthode

Sets read-only value.
public setReadOnlyValue ( string $name, mixed $value ) : self
$name string
$value mixed
Résultat self

setValue() public méthode

Sets property value.
public setValue ( string $name, mixed $value ) : self
$name string
$value mixed
Résultat self

toArray() public méthode

Converts entity to array.
public toArray ( integer $mode = self::TO_ARRAY_RELATIONSHIP_AS_IS ) : array
$mode integer
Résultat array