public function getObjects(callable $callback = null)
    {
        $objects = [];
        if ($this->storage instanceof PackageStorage && $this->pathPatterns !== []) {
            $objects = new \AppendIterator();
            foreach ($this->pathPatterns as $pathPattern) {
                $objects->append($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;
    }
public function getObjects(callable $callback = null)
    {
        $objects = [];
        if ($this->storage instanceof PackageStorage && $this->pathPatterns !== []) {
            $objects = new \AppendIterator();
            foreach ($this->pathPatterns as $pathPattern) {
                $objects->append($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;
    }
public function getObjects ( callable $ callback = null ) { $ objects = [ ] ; if ( $ this -> storage instanceof PackageStorage && $ this -> pathPatterns !== [ ] ) { $ objects = new \ AppendIterator ( ) ; foreach ( $ this -> pathPatterns as $ pathPattern ) { $ objects -> append ( $ 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 ; }
Returns all internal data objects of the storage attached to this collection.

@param callable $callback Function called after each object
@return \Generator<Storage\Object>
Returns all internal data objects of the storage attached to this collection .