PHP Class Nextras\Orm\Relationships\HasOne

Inheritance: extends Nette\Object, implements Nextras\Orm\Relationships\IRelationshipContainer
Afficher le fichier Open project: nextras/orm

Protected Properties

Свойство Type Description
$collection Nextras\Orm\Collection\ICollection
$isModified boolean
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata
$parent Nextras\Orm\Entity\IEntity
$primaryValue mixed
$relationshipMapper Nextras\Orm\Mapper\IRelationshipMapper
$targetRepository Nextras\Orm\Repository\IRepository
$updatingReverseRelationship boolean
$value Nextras\Orm\Entity\IEntity | null | false

Méthodes publiques

Méthode Description
__construct ( Nextras\Orm\Entity\IEntity $parent, PropertyMetadata $metadata )
getEntity ( $allowNull = false )
getInjectedValue ( )
getRawValue ( )
hasInjectedValue ( )
isLoaded ( )
isModified ( )
set ( $value, $allowNull = false )
setInjectedValue ( $value )
setParent ( Nextras\Orm\Entity\IEntity $parent )
setRawValue ( $value )

Méthodes protégées

Méthode Description
createCollection ( ) : Nextras\Orm\Collection\ICollection Creates relationship collection.
createEntity ( $value, $allowNull )
getCachedCollection ( ) : Nextras\Orm\Collection\ICollection
getPrimaryValue ( )
getTargetRepository ( )
initReverseRelationship ( Nextras\Orm\Entity\IEntity | null $currentEntity ) : mixed
isChanged ( $newValue )
modify ( ) : void Sets relationship (and entity) as modified.
updateRelationship ( Nextras\Orm\Entity\IEntity | null $oldEntity, Nextras\Orm\Entity\IEntity | null $newEntity, boolean $allowNull ) : void Updates relationship on the other side.

Method Details

__construct() public méthode

public __construct ( Nextras\Orm\Entity\IEntity $parent, PropertyMetadata $metadata )
$parent Nextras\Orm\Entity\IEntity
$metadata Nextras\Orm\Entity\Reflection\PropertyMetadata

createCollection() abstract protected méthode

Creates relationship collection.
abstract protected createCollection ( ) : Nextras\Orm\Collection\ICollection
Résultat Nextras\Orm\Collection\ICollection

createEntity() protected méthode

protected createEntity ( $value, $allowNull )

getCachedCollection() protected méthode

protected getCachedCollection ( ) : Nextras\Orm\Collection\ICollection
Résultat Nextras\Orm\Collection\ICollection

getEntity() public méthode

public getEntity ( $allowNull = false )

getInjectedValue() public méthode

public getInjectedValue ( )

getPrimaryValue() protected méthode

protected getPrimaryValue ( )

getRawValue() public méthode

public getRawValue ( )

getTargetRepository() protected méthode

protected getTargetRepository ( )

hasInjectedValue() public méthode

public hasInjectedValue ( )

initReverseRelationship() abstract protected méthode

abstract protected initReverseRelationship ( Nextras\Orm\Entity\IEntity | null $currentEntity ) : mixed
$currentEntity Nextras\Orm\Entity\IEntity | null
Résultat mixed

isChanged() protected méthode

protected isChanged ( $newValue )

isLoaded() public méthode

public isLoaded ( )

isModified() public méthode

public isModified ( )

modify() abstract protected méthode

Sets relationship (and entity) as modified.
abstract protected modify ( ) : void
Résultat void

set() public méthode

public set ( $value, $allowNull = false )

setInjectedValue() public méthode

public setInjectedValue ( $value )

setParent() public méthode

public setParent ( Nextras\Orm\Entity\IEntity $parent )
$parent Nextras\Orm\Entity\IEntity

setRawValue() public méthode

public setRawValue ( $value )

updateRelationship() abstract protected méthode

Updates relationship on the other side.
abstract protected updateRelationship ( Nextras\Orm\Entity\IEntity | null $oldEntity, Nextras\Orm\Entity\IEntity | null $newEntity, boolean $allowNull ) : void
$oldEntity Nextras\Orm\Entity\IEntity | null
$newEntity Nextras\Orm\Entity\IEntity | null
$allowNull boolean
Résultat void

Property Details

$collection protected_oe property

protected ICollection,Nextras\Orm\Collection $collection
Résultat Nextras\Orm\Collection\ICollection

$isModified protected_oe property

protected bool $isModified
Résultat boolean

$metadata protected_oe property

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

$parent protected_oe property

protected IEntity,Nextras\Orm\Entity $parent
Résultat Nextras\Orm\Entity\IEntity

$primaryValue protected_oe property

protected mixed $primaryValue
Résultat mixed

$relationshipMapper protected_oe property

protected IRelationshipMapper,Nextras\Orm\Mapper $relationshipMapper
Résultat Nextras\Orm\Mapper\IRelationshipMapper

$targetRepository protected_oe property

protected IRepository,Nextras\Orm\Repository $targetRepository
Résultat Nextras\Orm\Repository\IRepository

$updatingReverseRelationship protected_oe property

protected bool $updatingReverseRelationship
Résultat boolean

$value protected_oe property

protected IEntity,Nextras\Orm\Entity|null|false $value
Résultat Nextras\Orm\Entity\IEntity | null | false