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

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

보호된 프로퍼티들

프로퍼티 타입 설명
$addedObjects SplObjectStorage
$backend Neos\Flow\Persistence\Generic\Backend\BackendInterface
$changedObjects SplObjectStorage
$dataMapper DataMapper
$persistenceSession Session
$queryFactory Neos\Flow\Persistence\Generic\QueryFactoryInterface
$removedObjects SplObjectStorage

공개 메소드들

메소드 설명
__construct ( ) Create new instance
add ( object $object ) : void Adds an object to the persistence.
clearState ( ) : void Clears the in-memory state of the persistence.
createQueryForType ( string $type ) : Neos\Flow\Persistence\QueryInterface 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.
getObjectCountByQuery ( Neos\Flow\Persistence\QueryInterface $query ) : integer Returns the number of records matching the query.
getObjectDataByIdentifier ( string $identifier, string $objectType = null ) : object Returns the object data for the (internal) identifier, if it is known to the backend. Otherwise FALSE is returned.
getObjectDataByQuery ( Neos\Flow\Persistence\QueryInterface $query ) : array Returns the object data matching the $query.
initialize ( ) : void Initializes the persistence manager
injectBackend ( Neos\Flow\Persistence\Generic\Backend\BackendInterface $backend ) : void Injects the backend to use
injectDataMapper ( DataMapper $dataMapper ) : void Injects the data mapper
injectPersistenceSession ( Session $persistenceSession ) : void Injects the persistence session
injectQueryFactory ( Neos\Flow\Persistence\Generic\QueryFactoryInterface $queryFactory ) : void Injects a QueryFactory instance
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.
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 Tear down the persistence
update ( object $object ) : void Update an object in the persistence.

보호된 메소드들

메소드 설명
emitAllObjectsPersisted ( ) : void Signals that all persistAll() has been executed successfully.

메소드 상세

__construct() 공개 메소드

Create new instance
public __construct ( )

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". It will also forget about new objects.
public clearState ( ) : void
리턴 void

createQueryForType() 공개 메소드

Return a query object for the given type.
public createQueryForType ( string $type ) : Neos\Flow\Persistence\QueryInterface
$type string
리턴 Neos\Flow\Persistence\QueryInterface

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 This option is ignored in this persistence manager
리턴 object The object for the identifier if it is known, or NULL

getObjectCountByQuery() 공개 메소드

Returns the number of records matching the query.
public getObjectCountByQuery ( Neos\Flow\Persistence\QueryInterface $query ) : integer
$query Neos\Flow\Persistence\QueryInterface
리턴 integer

getObjectDataByIdentifier() 공개 메소드

Returns the object data for the (internal) identifier, if it is known to the backend. Otherwise FALSE is returned.
public getObjectDataByIdentifier ( string $identifier, string $objectType = null ) : object
$identifier string
$objectType string
리턴 object The object data for the identifier if it is known, or FALSE

getObjectDataByQuery() 공개 메소드

Returns the object data matching the $query.
public getObjectDataByQuery ( Neos\Flow\Persistence\QueryInterface $query ) : array
$query Neos\Flow\Persistence\QueryInterface
리턴 array

initialize() 공개 메소드

Initializes the persistence manager
public initialize ( ) : void
리턴 void

injectBackend() 공개 메소드

Injects the backend to use
public injectBackend ( Neos\Flow\Persistence\Generic\Backend\BackendInterface $backend ) : void
$backend Neos\Flow\Persistence\Generic\Backend\BackendInterface the backend to use for persistence
리턴 void

injectDataMapper() 공개 메소드

Injects the data mapper
public injectDataMapper ( DataMapper $dataMapper ) : void
$dataMapper DataMapper
리턴 void

injectPersistenceSession() 공개 메소드

Injects the persistence session
public injectPersistenceSession ( Session $persistenceSession ) : void
$persistenceSession Session The persistence session
리턴 void

injectQueryFactory() 공개 메소드

Injects a QueryFactory instance
public injectQueryFactory ( Neos\Flow\Persistence\Generic\QueryFactoryInterface $queryFactory ) : void
$queryFactory Neos\Flow\Persistence\Generic\QueryFactoryInterface
리턴 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 persistence session

persistAll() 공개 메소드

Commits new objects and changes to objects in the current persistence session into the backend
public persistAll ( boolean $onlyWhitelistedObjects = false ) : void
$onlyWhitelistedObjects boolean
리턴 void

remove() 공개 메소드

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

tearDown() 공개 메소드

This method is called in functional tests to reset the storage between tests. The implementation is optional and depends on the underlying persistence backend.
public tearDown ( ) : void
리턴 void

update() 공개 메소드

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

프로퍼티 상세

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

protected SplObjectStorage $addedObjects
리턴 SplObjectStorage

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

protected BackendInterface,Neos\Flow\Persistence\Generic\Backend $backend
리턴 Neos\Flow\Persistence\Generic\Backend\BackendInterface

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

protected SplObjectStorage $changedObjects
리턴 SplObjectStorage

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

protected DataMapper,Neos\Flow\Persistence\Generic $dataMapper
리턴 DataMapper

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

protected Session,Neos\Flow\Persistence\Generic $persistenceSession
리턴 Session

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

protected QueryFactoryInterface,Neos\Flow\Persistence\Generic $queryFactory
리턴 Neos\Flow\Persistence\Generic\QueryFactoryInterface

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

protected SplObjectStorage $removedObjects
리턴 SplObjectStorage