PHP Класс Neos\Flow\ResourceManagement\ResourceRepository

Note that this repository is not part of the public API and must not be used in client code. Please use the API provided by ResourceManager instead.
См. также: ResourceManager
Наследование: extends Neos\Flow\Persistence\Repository
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$addedResources SplObjectStorage
$entityManager Doctrine\Common\Persistence\ObjectManager
$persistenceManager Neos\Flow\Persistence\PersistenceManagerInterface
$removedResources SplObjectStorage

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

Метод Описание
__construct ( ) Constructor
add ( object $object )
findAllIterator ( ) : Doctrine\ORM\Internal\Hydration\IterableResult Finds all objects and return an IterableResult
findByCollectionNameIterator ( string $collectionName ) : Doctrine\ORM\Internal\Hydration\IterableResult Finds all objects by collection name and return an IterableResult
findByIdentifier ( mixed $identifier ) : object Finds an object matching the given identifier.
findBySha1 ( string $sha1Hash ) : array Find all resources with the same SHA1 hash
findOneBySha1 ( string $sha1Hash ) : PersistentResource Find one resource by SHA1
findSimilarResources ( PersistentResource $resource ) : Neos\Flow\Persistence\QueryResultInterface Finds other resources which are referring to the same resource data and filename
getAddedResources ( ) : SplObjectStorage
iterate ( Doctrine\ORM\Internal\Hydration\IterableResult $iterator, callable $callback = null ) : Generator Allow to iterate on an IterableResult and return a Generator
remove ( object $object ) : void Removes a PersistentResource object from this repository

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

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

Constructor
public __construct ( )

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

public add ( object $object )
$object object

findAllIterator() публичный Метод

Finds all objects and return an IterableResult
public findAllIterator ( ) : Doctrine\ORM\Internal\Hydration\IterableResult
Результат Doctrine\ORM\Internal\Hydration\IterableResult

findByCollectionNameIterator() публичный Метод

Finds all objects by collection name and return an IterableResult
public findByCollectionNameIterator ( string $collectionName ) : Doctrine\ORM\Internal\Hydration\IterableResult
$collectionName string
Результат Doctrine\ORM\Internal\Hydration\IterableResult

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

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

findBySha1() публичный Метод

Find all resources with the same SHA1 hash
public findBySha1 ( string $sha1Hash ) : array
$sha1Hash string
Результат array

findOneBySha1() публичный Метод

Find one resource by SHA1
public findOneBySha1 ( string $sha1Hash ) : PersistentResource
$sha1Hash string
Результат PersistentResource

findSimilarResources() публичный Метод

Finds other resources which are referring to the same resource data and filename
public findSimilarResources ( PersistentResource $resource ) : Neos\Flow\Persistence\QueryResultInterface
$resource PersistentResource The resource used for finding similar resources
Результат Neos\Flow\Persistence\QueryResultInterface The result, including the given resource

getAddedResources() публичный Метод

public getAddedResources ( ) : SplObjectStorage
Результат SplObjectStorage

iterate() публичный Метод

This methos is useful for batch processing huge result set. The callback is executed after every iteration. It can be used to clear the state of the persistence layer.
public iterate ( Doctrine\ORM\Internal\Hydration\IterableResult $iterator, callable $callback = null ) : Generator
$iterator Doctrine\ORM\Internal\Hydration\IterableResult
$callback callable
Результат Generator

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

Removes a PersistentResource object from this repository
public remove ( object $object ) : void
$object object
Результат void

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

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

protected SplObjectStorage $addedResources
Результат SplObjectStorage

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

protected ObjectManager,Doctrine\Common\Persistence $entityManager
Результат Doctrine\Common\Persistence\ObjectManager

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

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

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

protected SplObjectStorage $removedResources
Результат SplObjectStorage