Neos\Flow\ResourceManagement\CollectionInterface::getObjects PHP Метод

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

Returns all internal data objects of the storage attached to this collection.
public getObjects ( ) : Generator
Результат Generator
    public function getObjects();

Usage Example

 /**
  * Publishes the whole collection to this target
  *
  * @param CollectionInterface $collection The collection to publish
  * @param callable $callback Function called after each resource publishing
  * @return void
  */
 public function publishCollection(CollectionInterface $collection, callable $callback = null)
 {
     foreach ($collection->getObjects($callback) as $object) {
         /** @var StorageObject $object */
         $sourceStream = $object->getStream();
         if ($sourceStream === false) {
             $this->handleMissingData($object, $collection);
             continue;
         }
         $this->publishFile($sourceStream, $this->getRelativePublicationPathAndFilename($object));
         fclose($sourceStream);
     }
 }