PHP Класс Neos\Flow\Persistence\Repository

Наследование: implements Neos\Flow\Persistence\RepositoryInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$defaultOrderings array
$entityClassName string Warning: if you think you want to set this, look at RepositoryInterface::ENTITY_CLASSNAME first!
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface

Открытые методы

Метод Описание
__call ( string $method, array $arguments ) : mixed Magic call method for repository methods.
__construct ( ) Initializes a new Repository.
add ( object $object ) : void Adds an object to this repository.
countAll ( ) : integer Counts all objects of this repository
createQuery ( ) : Neos\Flow\Persistence\QueryInterface Returns a query for objects of this repository
findAll ( ) : Neos\Flow\Persistence\QueryResultInterface Returns all objects of this repository
findByIdentifier ( string $identifier ) : object Finds an object matching the given identifier.
getEntityClassName ( ) : string Returns the classname of the entities this repository is managing.
remove ( object $object ) : void Removes an object from this repository.
removeAll ( ) : void Removes all objects of this repository as if remove() was called for all of them.
setDefaultOrderings ( array $defaultOrderings ) : void Sets the property names to order results by. Expected like this: array( 'foo' => \Neos\Flow\Persistence\QueryInterface::ORDER_ASCENDING, 'bar' => \Neos\Flow\Persistence\QueryInterface::ORDER_DESCENDING )
update ( object $object ) Schedules a modified object for persistence.

Описание методов

__call() публичный метод

Provides three methods - findBy($value, $caseSensitive = TRUE, $cacheResult = FALSE) - findOneBy($value, $caseSensitive = TRUE, $cacheResult = FALSE) - countBy($value, $caseSensitive = TRUE)
public __call ( string $method, array $arguments ) : mixed
$method string Name of the method
$arguments array The arguments
Результат mixed The result of the repository method

__construct() публичный метод

Initializes a new Repository.
public __construct ( )

add() публичный метод

Adds an object to this repository.
public add ( object $object ) : void
$object object The object to add
Результат void

countAll() публичный метод

Counts all objects of this repository
public countAll ( ) : integer
Результат integer

createQuery() публичный метод

Returns a query for objects of this repository
public createQuery ( ) : Neos\Flow\Persistence\QueryInterface
Результат Neos\Flow\Persistence\QueryInterface

findAll() публичный метод

Returns all objects of this repository
См. также: QueryInterface::execute()
public findAll ( ) : Neos\Flow\Persistence\QueryResultInterface
Результат Neos\Flow\Persistence\QueryResultInterface The query result

findByIdentifier() публичный метод

Finds an object matching the given identifier.
public findByIdentifier ( string $identifier ) : object
$identifier string The identifier of the object to find
Результат object The matching object if found, otherwise NULL

getEntityClassName() публичный метод

Note that anything that is an "instanceof" this class is accepted by the repository.
public getEntityClassName ( ) : string
Результат string

remove() публичный метод

Removes an object from this repository.
public remove ( object $object ) : void
$object object The object to remove
Результат void

removeAll() публичный метод

Removes all objects of this repository as if remove() was called for all of them.
public removeAll ( ) : void
Результат void

setDefaultOrderings() публичный метод

Sets the property names to order results by. Expected like this: array( 'foo' => \Neos\Flow\Persistence\QueryInterface::ORDER_ASCENDING, 'bar' => \Neos\Flow\Persistence\QueryInterface::ORDER_DESCENDING )
public setDefaultOrderings ( array $defaultOrderings ) : void
$defaultOrderings array The property names to order by by default
Результат void

update() публичный метод

Schedules a modified object for persistence.
public update ( object $object )
$object object The modified object

Описание свойств

$defaultOrderings защищенное свойство

protected array $defaultOrderings
Результат array

$entityClassName защищенное свойство

Warning: if you think you want to set this, look at RepositoryInterface::ENTITY_CLASSNAME first!
protected string $entityClassName
Результат string

$persistenceManager защищенное свойство

protected PersistenceManagerInterface,Neos\Flow\Persistence $persistenceManager
Результат Neos\Flow\Persistence\PersistenceManagerInterface