PHP 클래스 Neos\Flow\Persistence\Doctrine\PersistenceManager

상속: extends Neos\Flow\Persistence\AbstractPersistenceManager
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$entityManager Doctrine\Common\Persistence\ObjectManager
$reflectionService Neos\Flow\Reflection\ReflectionService
$systemLogger Neos\Flow\Log\SystemLoggerInterface
$validatorResolver Neos\Flow\Validation\ValidatorResolver

공개 메소드들

메소드 설명
add ( object $object ) : void Adds an object to the persistence.
clearState ( ) : void Clears the in-memory state of the persistence.
compile ( ) : boolean Called from functional tests, creates/updates database tables and compiles proxies.
createQueryForType ( string $type ) : Query Return a query object for the given type.
getIdentifierByObject ( object $object ) : mixed Returns the (internal) identifier for the object, if it is known to the backend. Otherwise NULL is returned.
getObjectByIdentifier ( mixed $identifier, string $objectType = null, boolean $useLazyLoading = false ) : object Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.
hasUnpersistedChanges ( ) : boolean Gives feedback if the persistence Manager has unpersisted changes.
initializeObject ( ) : void Initializes the persistence manager, called by Flow.
isConnected ( ) : boolean Returns TRUE, if an active connection to the persistence backend has been established, e.g. entities can be persisted.
isNewObject ( object $object ) : boolean Checks if the given object has ever been persisted.
onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $eventArgs ) : void An onFlush event listener used to validate entities upon persistence.
persistAll ( boolean $onlyWhitelistedObjects = false ) : void Commits new objects and changes to objects in the current persistence session into the backend
remove ( object $object ) : void Removes an object to the persistence.
tearDown ( ) : void Called after a functional test in Flow, dumps everything in the database.
update ( object $object ) : void Update an object in the persistence.

보호된 메소드들

메소드 설명
emitAllObjectsPersisted ( ) : void Signals that all persistAll() has been executed successfully.
validateObject ( object $object, SplObjectStorage $validatedInstancesContainer ) : void Validates the given object and throws an exception if validation fails.

메소드 상세

add() 공개 메소드

Adds an object to the persistence.
public add ( object $object ) : void
$object object The object to add
리턴 void

clearState() 공개 메소드

Managed instances become detached, any fetches will return data directly from the persistence "backend".
public clearState ( ) : void
리턴 void

compile() 공개 메소드

Called from functional tests, creates/updates database tables and compiles proxies.
public compile ( ) : boolean
리턴 boolean

createQueryForType() 공개 메소드

Return a query object for the given type.
public createQueryForType ( string $type ) : Query
$type string
리턴 Query

emitAllObjectsPersisted() 보호된 메소드

Signals that all persistAll() has been executed successfully.
protected emitAllObjectsPersisted ( ) : void
리턴 void

getIdentifierByObject() 공개 메소드

Note: this returns an identifier even if the object has not been persisted in case of AOP-managed entities. Use isNewObject() if you need to distinguish those cases.
public getIdentifierByObject ( object $object ) : mixed
$object object
리턴 mixed The identifier for the object if it is known, or NULL

getObjectByIdentifier() 공개 메소드

Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.
public getObjectByIdentifier ( mixed $identifier, string $objectType = null, boolean $useLazyLoading = false ) : object
$identifier mixed
$objectType string
$useLazyLoading boolean Set to TRUE if you want to use lazy loading for this object
리턴 object The object for the identifier if it is known, or NULL

hasUnpersistedChanges() 공개 메소드

This is primarily used to inform the user if he tries to save data in an unsafe request.
public hasUnpersistedChanges ( ) : boolean
리턴 boolean

initializeObject() 공개 메소드

Initializes the persistence manager, called by Flow.
public initializeObject ( ) : void
리턴 void

isConnected() 공개 메소드

Returns TRUE, if an active connection to the persistence backend has been established, e.g. entities can be persisted.
public isConnected ( ) : boolean
리턴 boolean TRUE, if an connection has been established, FALSE if add object will not be persisted by the backend

isNewObject() 공개 메소드

Checks if the given object has ever been persisted.
public isNewObject ( object $object ) : boolean
$object object The object to check
리턴 boolean TRUE if the object is new, FALSE if the object exists in the repository

onFlush() 공개 메소드

An onFlush event listener used to validate entities upon persistence.
public onFlush ( Doctrine\ORM\Event\OnFlushEventArgs $eventArgs ) : void
$eventArgs Doctrine\ORM\Event\OnFlushEventArgs
리턴 void

persistAll() 공개 메소드

Commits new objects and changes to objects in the current persistence session into the backend
public persistAll ( boolean $onlyWhitelistedObjects = false ) : void
$onlyWhitelistedObjects boolean If TRUE an exception will be thrown if there are scheduled updates/deletes or insertions for objects that are not "whitelisted" (see AbstractPersistenceManager::whitelistObject())
리턴 void

remove() 공개 메소드

Removes an object to the persistence.
public remove ( object $object ) : void
$object object The object to remove
리턴 void

tearDown() 공개 메소드

Called after a functional test in Flow, dumps everything in the database.
public tearDown ( ) : void
리턴 void

update() 공개 메소드

Update an object in the persistence.
public update ( object $object ) : void
$object object The modified object
리턴 void

validateObject() 보호된 메소드

Validates the given object and throws an exception if validation fails.
protected validateObject ( object $object, SplObjectStorage $validatedInstancesContainer ) : void
$object object
$validatedInstancesContainer SplObjectStorage
리턴 void

프로퍼티 상세

$entityManager 보호되어 있는 프로퍼티

protected ObjectManager,Doctrine\Common\Persistence $entityManager
리턴 Doctrine\Common\Persistence\ObjectManager

$reflectionService 보호되어 있는 프로퍼티

protected ReflectionService,Neos\Flow\Reflection $reflectionService
리턴 Neos\Flow\Reflection\ReflectionService

$systemLogger 보호되어 있는 프로퍼티

protected SystemLoggerInterface,Neos\Flow\Log $systemLogger
리턴 Neos\Flow\Log\SystemLoggerInterface

$validatorResolver 보호되어 있는 프로퍼티

protected ValidatorResolver,Neos\Flow\Validation $validatorResolver
리턴 Neos\Flow\Validation\ValidatorResolver