PHP Class Nextras\Orm\Relationships\HasOne

Inheritance: extends Nette\Object, implements Nextras\Orm\Relationships\IRelationshipContainer
Exibir arquivo Open project: nextras/orm

Protected Properties

Property 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

Public Methods

Method 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 )

Protected Methods

Method 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 method

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

createCollection() abstract protected method

Creates relationship collection.
abstract protected createCollection ( ) : Nextras\Orm\Collection\ICollection
return Nextras\Orm\Collection\ICollection

createEntity() protected method

protected createEntity ( $value, $allowNull )

getCachedCollection() protected method

protected getCachedCollection ( ) : Nextras\Orm\Collection\ICollection
return Nextras\Orm\Collection\ICollection

getEntity() public method

public getEntity ( $allowNull = false )

getInjectedValue() public method

public getInjectedValue ( )

getPrimaryValue() protected method

protected getPrimaryValue ( )

getRawValue() public method

public getRawValue ( )

getTargetRepository() protected method

protected getTargetRepository ( )

hasInjectedValue() public method

public hasInjectedValue ( )

initReverseRelationship() abstract protected method

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

isChanged() protected method

protected isChanged ( $newValue )

isLoaded() public method

public isLoaded ( )

isModified() public method

public isModified ( )

modify() abstract protected method

Sets relationship (and entity) as modified.
abstract protected modify ( ) : void
return void

set() public method

public set ( $value, $allowNull = false )

setInjectedValue() public method

public setInjectedValue ( $value )

setParent() public method

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

setRawValue() public method

public setRawValue ( $value )

updateRelationship() abstract protected method

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
return void

Property Details

$collection protected_oe property

protected ICollection,Nextras\Orm\Collection $collection
return Nextras\Orm\Collection\ICollection

$isModified protected_oe property

protected bool $isModified
return boolean

$metadata protected_oe property

protected PropertyMetadata,Nextras\Orm\Entity\Reflection $metadata
return Nextras\Orm\Entity\Reflection\PropertyMetadata

$parent protected_oe property

protected IEntity,Nextras\Orm\Entity $parent
return Nextras\Orm\Entity\IEntity

$primaryValue protected_oe property

protected mixed $primaryValue
return mixed

$relationshipMapper protected_oe property

protected IRelationshipMapper,Nextras\Orm\Mapper $relationshipMapper
return Nextras\Orm\Mapper\IRelationshipMapper

$targetRepository protected_oe property

protected IRepository,Nextras\Orm\Repository $targetRepository
return Nextras\Orm\Repository\IRepository

$updatingReverseRelationship protected_oe property

protected bool $updatingReverseRelationship
return boolean

$value protected_oe property

protected IEntity,Nextras\Orm\Entity|null|false $value
return Nextras\Orm\Entity\IEntity | null | false