PHP Class Nextras\Orm\Entity\AbstractEntity

Inheritance: implements Nextras\Orm\Entity\IEntity
Afficher le fichier Open project: nextras/orm Class Usage Examples

Protected Properties

Свойство Type Description
$metadata Nextras\Orm\Entity\Reflection\EntityMetadata

Méthodes publiques

Méthode Description
__clone ( )
__construct ( )
fireEvent ( $method, $args = [] )
getMetadata ( )
getModel ( $need = true )
getPersistedId ( )
getPreloadContainer ( )
getProperty ( $name )
getRawProperty ( $name )
getRawValue ( $name )
getRepository ( $need = true )
getValue ( string $name ) : mixed Returns value.
hasValue ( $name )
isAttached ( )
isModified ( $name = null )
isPersisted ( )
serialize ( )
setAsModified ( $name = null )
setPreloadContainer ( Nextras\Orm\Collection\IEntityPreloadContainer $overIterator = null )
setRawValue ( $name, $value )
setReadOnlyValue ( $name, $value )
setValue ( $name, $value )
toArray ( $mode = self::TO_ARRAY_RELATIONSHIP_AS_IS )
unserialize ( $unserialized )

Méthodes protégées

Méthode Description
createMetadata ( ) : EntityMetadata
createPropertyContainer ( PropertyMetadata $metadata ) : Nextras\Orm\Entity\IProperty
onAfterInsert ( )
onAfterPersist ( )
onAfterRemove ( )
onAfterUpdate ( )
onAttach ( Nextras\Orm\Repository\IRepository $repository, EntityMetadata $metadata )
onBeforeInsert ( )
onBeforePersist ( )
onBeforeRemove ( )
onBeforeUpdate ( )
onCreate ( ) === events ======================================================================================================
onDetach ( )
onFree ( )
onLoad ( array $data )
onPersist ( $id )
onRefresh ( array $data )
validate ( PropertyMetadata $metadata, string $name, mixed &$value ) Validates the value.

Private Methods

Méthode Description
attach ( Nextras\Orm\Repository\IRepository $repository )
getterPrimaryProxy ( $value = null, PropertyMetadata $metadata )
initProperty ( PropertyMetadata $metadata, $name )
internalGetValue ( PropertyMetadata $metadata, $name )
internalHasValue ( PropertyMetadata $metadata, $name )
internalSetValue ( PropertyMetadata $metadata, $name, $value )
setterPrimaryProxy ( $value, PropertyMetadata $metadata )

Method Details

__clone() public méthode

public __clone ( )

__construct() public méthode

public __construct ( )

createMetadata() protected méthode

protected createMetadata ( ) : EntityMetadata
Résultat Nextras\Orm\Entity\Reflection\EntityMetadata

createPropertyContainer() protected méthode

protected createPropertyContainer ( PropertyMetadata $metadata ) : Nextras\Orm\Entity\IProperty
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
Résultat Nextras\Orm\Entity\IProperty $property

fireEvent() public méthode

public fireEvent ( $method, $args = [] )

getMetadata() public méthode

public getMetadata ( )

getModel() public méthode

public getModel ( $need = true )

getPersistedId() public méthode

public getPersistedId ( )

getPreloadContainer() public méthode

public getPreloadContainer ( )

getProperty() public méthode

public getProperty ( $name )

getRawProperty() public méthode

public getRawProperty ( $name )

getRawValue() public méthode

public getRawValue ( $name )

getRepository() public méthode

public getRepository ( $need = true )

getValue() public méthode

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

hasValue() public méthode

public hasValue ( $name )

isAttached() public méthode

public isAttached ( )

isModified() public méthode

public isModified ( $name = null )

isPersisted() public méthode

public isPersisted ( )

onAfterInsert() protected méthode

protected onAfterInsert ( )

onAfterPersist() protected méthode

protected onAfterPersist ( )

onAfterRemove() protected méthode

protected onAfterRemove ( )

onAfterUpdate() protected méthode

protected onAfterUpdate ( )

onAttach() protected méthode

protected onAttach ( Nextras\Orm\Repository\IRepository $repository, EntityMetadata $metadata )
$repository Nextras\Orm\Repository\IRepository
$metadata Nextras\Orm\Entity\Reflection\EntityMetadata

onBeforeInsert() protected méthode

protected onBeforeInsert ( )

onBeforePersist() protected méthode

protected onBeforePersist ( )

onBeforeRemove() protected méthode

protected onBeforeRemove ( )

onBeforeUpdate() protected méthode

protected onBeforeUpdate ( )

onCreate() protected méthode

=== events ======================================================================================================
protected onCreate ( )

onDetach() protected méthode

protected onDetach ( )

onFree() protected méthode

protected onFree ( )

onLoad() protected méthode

protected onLoad ( array $data )
$data array

onPersist() protected méthode

protected onPersist ( $id )

onRefresh() protected méthode

protected onRefresh ( array $data )
$data array

serialize() public méthode

public serialize ( )

setAsModified() public méthode

public setAsModified ( $name = null )

setPreloadContainer() public méthode

public setPreloadContainer ( Nextras\Orm\Collection\IEntityPreloadContainer $overIterator = null )
$overIterator Nextras\Orm\Collection\IEntityPreloadContainer

setRawValue() public méthode

public setRawValue ( $name, $value )

setReadOnlyValue() public méthode

public setReadOnlyValue ( $name, $value )

setValue() public méthode

public setValue ( $name, $value )

toArray() public méthode

public toArray ( $mode = self::TO_ARRAY_RELATIONSHIP_AS_IS )

unserialize() public méthode

public unserialize ( $unserialized )

validate() protected méthode

Validates the value.
protected validate ( PropertyMetadata $metadata, string $name, mixed &$value )
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$name string
$value mixed

Property Details

$metadata protected_oe property

protected EntityMetadata,Nextras\Orm\Entity\Reflection $metadata
Résultat Nextras\Orm\Entity\Reflection\EntityMetadata