TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
RepositoryInterface Interface Reference
Inheritance diagram for RepositoryInterface:
AbstractRepository Repository FileRepository ProcessedFileRepository StorageRepository BlogRepository PersonRepository PostRepository ContentRepository ExtensionRepository HistoryEntryRepository LogEntryRepository WorkspaceRepository BackendUserGroupRepository BackendUserSessionRepository BackendUserGroupRepository BackendUserRepository CategoryRepository FileMountRepository FrontendUserGroupRepository FrontendUserRepository ExtensionRepository RepositoryRepository SysNoteRepository

Public Member Functions

 add ($object)
 
 remove ($object)
 
 update ($modifiedObject)
 
 findAll ()
 
 countAll ()
 
 removeAll ()
 
 findByUid ($uid)
 
 findByIdentifier ($identifier)
 
 setDefaultOrderings (array $defaultOrderings)
 
 setDefaultQuerySettings (\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface $defaultQuerySettings)
 
 createQuery ()
 

Detailed Description

Contract for a repository

Definition at line 22 of file RepositoryInterface.php.

Member Function Documentation

add (   $object)

Adds an object to this repository.

Parameters
object$objectThe object to add
Returns
void

Implemented in ProcessedFileRepository, Repository, and AbstractRepository.

countAll ( )

Returns the total number objects of this repository.

Returns
int The object count

Implemented in AbstractRepository, Repository, and ExtensionRepository.

createQuery ( )

Returns a query for objects of this repository

Returns

Implemented in AbstractRepository, Repository, BackendUserRepository, and BackendUserGroupRepository.

findAll ( )

Returns all objects of this repository.

Returns
|array The query result

Implemented in AbstractRepository, Repository, and ExtensionRepository.

findByIdentifier (   $identifier)

Finds an object matching the given identifier.

Parameters
mixed$identifierThe identifier of the object to find
Returns
object The matching object if found, otherwise NULL

Implemented in AbstractRepository, and Repository.

findByUid (   $uid)

Finds an object matching the given identifier.

Parameters
int$uidThe identifier of the object to find
Returns
object The matching object if found, otherwise NULL

Implemented in AbstractRepository, Repository, and StorageRepository.

remove (   $object)

Removes an object from this repository.

Parameters
object$objectThe object to remove
Returns
void

Implemented in Repository, and AbstractRepository.

removeAll ( )

Removes all objects of this repository as if remove() was called for all of them.

Returns
void

Implemented in AbstractRepository, and Repository.

setDefaultOrderings ( array  $defaultOrderings)

Sets the property names to order the result by per default. Expected like this: array( 'foo' => ::ORDER_ASCENDING, 'bar' => ::ORDER_DESCENDING )

Parameters
array$defaultOrderingsThe property names to order by
Returns
void

Implemented in AbstractRepository, and Repository.

setDefaultQuerySettings ( \TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface  $defaultQuerySettings)

Sets the default query settings to be used in this repository

Parameters
\TYPO3\CMS\Extbase\Persistence\Generic\QuerySettingsInterface$defaultQuerySettingsThe query settings to be used by default
Returns
void

Implemented in AbstractRepository, and Repository.

update (   $modifiedObject)

Replaces an existing object with the same identifier by the given object

Parameters
object$modifiedObjectThe modified object

Implemented in ProcessedFileRepository, Repository, and AbstractRepository.