/**
  * Returns all internal data objects of the storage attached to this collection.
  *
  * @param callable $callback Function called after each object
  * @return \Generator<\TYPO3\Flow\Resource\Storage\Object>
  */
 public function getObjects(callable $callback = null)
 {
     $objects = [];
     if ($this->storage instanceof PackageStorage && $this->pathPatterns !== array()) {
         foreach ($this->pathPatterns as $pathPattern) {
             $objects = array_merge($objects, $this->storage->getObjectsByPathPattern($pathPattern, $callback));
         }
     } else {
         $objects = $this->storage->getObjectsByCollection($this, $callback);
     }
     // TODO: Implement filter manipulation here:
     // foreach ($objects as $object) {
     // 	$object->setStream(function() { return fopen('/tmp/test.txt', 'rb');});
     // }
     return $objects;
 }
예제 #2
0
 /**
  * Returns all internal data objects of the storage attached to this collection.
  *
  * @return array<\TYPO3\Flow\Resource\Storage\Object>
  */
 public function getObjects()
 {
     $objects = array();
     if ($this->storage instanceof PackageStorage && $this->pathPatterns !== array()) {
         foreach ($this->pathPatterns as $pathPattern) {
             $objects = array_merge($objects, $this->storage->getObjectsByPathPattern($pathPattern));
         }
     } else {
         $objects = $this->storage->getObjectsByCollection($this);
     }
     #		TODO: Implement filter manipulation here:
     #		foreach ($objects as $object) {
     #			$object->setStream(function() { return fopen('/tmp/test.txt', 'rb');});
     #		}
     return $objects;
 }