TYPO3
7.6
|
Public Member Functions | |
injectQueryFactory (\TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface $queryFactory) | |
injectBackend (\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface $backend) | |
injectPersistenceSession (\TYPO3\CMS\Extbase\Persistence\Generic\Session $persistenceSession) | |
__construct () | |
registerRepositoryClassName ($className) | |
getObjectCountByQuery (QueryInterface $query) | |
getObjectDataByQuery (QueryInterface $query) | |
getIdentifierByObject ($object) | |
getObjectByIdentifier ($identifier, $objectType=null, $useLazyLoading=false) | |
persistAll () | |
createQueryForType ($type) | |
add ($object) | |
remove ($object) | |
update ($object) | |
injectSettings (array $settings) | |
initializeObject () | |
clearState () | |
isNewObject ($object) | |
registerNewObject ($object) | |
convertObjectToIdentityArray ($object) | |
convertObjectsToIdentityArrays (array $array) | |
tearDown () | |
Protected Attributes | |
$newObjects = array() | |
$changedObjects | |
$addedObjects | |
$removedObjects | |
$queryFactory | |
$backend | |
$persistenceSession | |
The Extbase Persistence Manager
Definition at line 25 of file PersistenceManager.php.
__construct | ( | ) |
Create new instance
Definition at line 89 of file PersistenceManager.php.
add | ( | $object | ) |
Adds an object to the persistence.
object | $object | The object to add |
Implements PersistenceManagerInterface.
Definition at line 210 of file PersistenceManager.php.
clearState | ( | ) |
Clears the in-memory state of the persistence.
Managed instances become detached, any fetches will return data directly from the persistence "backend".
\TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException |
Implements PersistenceManagerInterface.
Definition at line 280 of file PersistenceManager.php.
convertObjectsToIdentityArrays | ( | array | $array | ) |
Recursively iterates through the given array and turns objects into arrays containing the identity of the domain object.
\TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException |
array | $array | The array to be iterated over |
Implements PersistenceManagerInterface.
Definition at line 342 of file PersistenceManager.php.
convertObjectToIdentityArray | ( | $object | ) |
Converts the given object into an array containing the identity of the domain object.
\TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException |
object | $object | The object to be converted |
Implements PersistenceManagerInterface.
Definition at line 327 of file PersistenceManager.php.
createQueryForType | ( | $type | ) |
Return a query object for the given type.
string | $type |
Implements PersistenceManagerInterface.
Definition at line 198 of file PersistenceManager.php.
getIdentifierByObject | ( | $object | ) |
Returns the (internal) identifier for the object, if it is known to the backend. Otherwise NULL is returned.
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.
object | $object |
Implements PersistenceManagerInterface.
Definition at line 142 of file PersistenceManager.php.
Referenced by PersistenceManager\registerNewObject().
getObjectByIdentifier | ( | $identifier, | |
$objectType = null , |
|||
$useLazyLoading = false |
|||
) |
Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.
mixed | $identifier | |
string | $objectType | |
bool | $useLazyLoading | Set to TRUE if you want to use lazy loading for this object |
Implements PersistenceManagerInterface.
Definition at line 157 of file PersistenceManager.php.
getObjectCountByQuery | ( | QueryInterface | $query | ) |
Returns the number of records matching the query.
QueryInterface | $query |
Implements PersistenceManagerInterface.
Definition at line 113 of file PersistenceManager.php.
getObjectDataByQuery | ( | QueryInterface | $query | ) |
Returns the object data matching the $query.
QueryInterface | $query |
Implements PersistenceManagerInterface.
Definition at line 125 of file PersistenceManager.php.
initializeObject | ( | ) |
Initializes the persistence manager, called by Extbase.
Definition at line 266 of file PersistenceManager.php.
injectBackend | ( | \TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface | $backend | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\BackendInterface | $backend |
Definition at line 73 of file PersistenceManager.php.
References PersistenceManager\$backend.
injectPersistenceSession | ( | \TYPO3\CMS\Extbase\Persistence\Generic\Session | $persistenceSession | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\Session | $persistenceSession |
Definition at line 81 of file PersistenceManager.php.
References PersistenceManager\$persistenceSession.
injectQueryFactory | ( | \TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface | $queryFactory | ) |
\TYPO3\CMS\Extbase\Persistence\Generic\QueryFactoryInterface | $queryFactory |
Definition at line 65 of file PersistenceManager.php.
References PersistenceManager\$queryFactory.
injectSettings | ( | array | $settings | ) |
Injects the Extbase settings, called by Extbase.
array | $settings |
\TYPO3\CMS\Extbase\Persistence\Generic\Exception\NotImplementedException |
Implements PersistenceManagerInterface.
Definition at line 256 of file PersistenceManager.php.
isNewObject | ( | $object | ) |
Checks if the given object has ever been persisted.
object | $object | The object to check |
Implements PersistenceManagerInterface.
Definition at line 296 of file PersistenceManager.php.
Referenced by PersistenceManager\update().
persistAll | ( | ) |
Commits new objects and changes to objects in the current persistence session into the backend
Implements PersistenceManagerInterface.
Definition at line 176 of file PersistenceManager.php.
registerNewObject | ( | $object | ) |
Registers an object which has been created or cloned during this request.
A "new" object does not necessarily have to be known by any repository or be persisted in the end.
Objects registered with this method must be known to the getObjectByIdentifier() method.
object | $object | The new object to register |
Definition at line 313 of file PersistenceManager.php.
References PersistenceManager\getIdentifierByObject().
registerRepositoryClassName | ( | $className | ) |
Registers a repository
string | $className | The class name of the repository to be registered |
Implements PersistenceManagerInterface.
Definition at line 102 of file PersistenceManager.php.
remove | ( | $object | ) |
Removes an object to the persistence.
object | $object | The object to remove |
Implements PersistenceManagerInterface.
Definition at line 223 of file PersistenceManager.php.
tearDown | ( | ) |
Tear down the persistence
This method is called in functional tests to reset the storage between tests. The implementation is optional and depends on the underlying persistence backend.
Definition at line 355 of file PersistenceManager.php.
update | ( | $object | ) |
Update an object in the persistence.
object | $object | The modified object |
\TYPO3\CMS\Extbase\Persistence\Exception\UnknownObjectException |
Implements PersistenceManagerInterface.
Definition at line 240 of file PersistenceManager.php.
References PersistenceManager\isNewObject().
|
protected |
Definition at line 40 of file PersistenceManager.php.
|
protected |
Definition at line 55 of file PersistenceManager.php.
Referenced by PersistenceManager\injectBackend().
|
protected |
Definition at line 35 of file PersistenceManager.php.
|
protected |
Definition at line 30 of file PersistenceManager.php.
|
protected |
Definition at line 60 of file PersistenceManager.php.
Referenced by PersistenceManager\injectPersistenceSession().
|
protected |
Definition at line 50 of file PersistenceManager.php.
Referenced by PersistenceManager\injectQueryFactory().
|
protected |
Definition at line 45 of file PersistenceManager.php.