TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface Interface Reference
Inheritance diagram for TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface:
Tx_Extbase_Persistence_ManagerInterface Tx_Extbase_Persistence_PersistenceManagerInterface TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager Tx_Extbase_Persistence_Manager

Public Member Functions

 persistAll ()
 
 clearState ()
 
 isNewObject ($object)
 
 getIdentifierByObject ($object)
 
 getObjectByIdentifier ($identifier, $objectType=NULL, $useLazyLoading=FALSE)
 
 getObjectCountByQuery (QueryInterface $query)
 
 getObjectDataByQuery (QueryInterface $query)
 
 registerRepositoryClassName ($className)
 
 add ($object)
 
 remove ($object)
 
 update ($object)
 
 injectSettings (array $settings)
 
 convertObjectToIdentityArray ($object)
 
 convertObjectsToIdentityArrays (array $array)
 
 createQueryForType ($type)
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! The Extbase Persistence Manager interface

Definition at line 19 of file PersistenceManagerInterface.php.

Member Function Documentation

◆ add()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::add (   $object)

Adds an object to the persistence.

Parameters
object$objectThe object to add
Returns
void

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ clearState()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::clearState ( )

Clears the in-memory state of the persistence.

Managed instances become detached, any fetches will return data directly from the persistence "backend".

Returns
void

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ convertObjectsToIdentityArrays()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::convertObjectsToIdentityArrays ( array  $array)

Recursively iterates through the given array and turns objects into arrays containing the identity of the domain object.

Parameters
array$arrayThe array to be iterated over
Returns
array The modified array without objects
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ convertObjectToIdentityArray()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::convertObjectToIdentityArray (   $object)

Converts the given object into an array containing the identity of the domain object.

Parameters
object$objectThe object to be converted
Returns
array The identity array in the format array('__identity' => '...')
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ createQueryForType()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::createQueryForType (   $type)

Return a query object for the given type.

Parameters
string$type
Returns
QueryInterface

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ getIdentifierByObject()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::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.

Parameters
object$object
Returns
mixed The identifier for the object if it is known, or NULL

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ getObjectByIdentifier()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::getObjectByIdentifier (   $identifier,
  $objectType = NULL,
  $useLazyLoading = FALSE 
)

Returns the object with the (internal) identifier, if it is known to the backend. Otherwise NULL is returned.

Parameters
mixed$identifier
string$objectType
boolean$useLazyLoadingSet to TRUE if you want to use lazy loading for this object
Returns
object The object for the identifier if it is known, or NULL

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ getObjectCountByQuery()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::getObjectCountByQuery ( QueryInterface  $query)

Returns the number of records matching the query.

Parameters
QueryInterface$query
Returns
integer
Deprecated:
since Extbase 6.0, will be removed in Extbase 7.0. It is deprecated only in the interface to be more in sync with Flow in future and will stay in Generic Persistence.

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ getObjectDataByQuery()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::getObjectDataByQuery ( QueryInterface  $query)

Returns the object data matching the $query.

Parameters
QueryInterface$query
Returns
array
Deprecated:
since Extbase 6.0, will be removed in Extbase 7.0. It is deprecated only in the interface to be more in sync with Flow in future and will stay in Generic Persistence.

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ injectSettings()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::injectSettings ( array  $settings)

Injects the Extbase settings, called by Extbase.

Parameters
array$settings
Returns
void

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ isNewObject()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::isNewObject (   $object)

Checks if the given object has ever been persisted.

Parameters
object$objectThe object to check
Returns
boolean TRUE if the object is new, FALSE if the object exists in the repository

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ persistAll()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::persistAll ( )

Commits new objects and changes to objects in the current persistence session into the backend

Returns
void

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ registerRepositoryClassName()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::registerRepositoryClassName (   $className)

Registers a repository

Parameters
string$classNameThe class name of the repository to be reigistered
Deprecated:
since Extbase 6.0, will be removed in Extbase 7.0. It is deprecated only in the interface to be more in sync with Flow in future and will stay in Generic Persistence.
Returns
void

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ remove()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::remove (   $object)

Removes an object to the persistence.

Parameters
object$objectThe object to remove
Returns
void

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.

◆ update()

TYPO3\CMS\Extbase\Persistence\PersistenceManagerInterface::update (   $object)

Update an object in the persistence.

Parameters
object$objectThe modified object
Returns
void
Exceptions

Implemented in TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager.