forDirectory example

$resource = new GlobResource($prefix$pattern$recursive$forExclusion$excluded);

        yield from $resource;
    }

    private function doImport(mixed $resource, string $type = null, bool $ignoreErrors = false, string $sourceResource = null): mixed
    {
        try {
            $loader = $this->resolve($resource$type);

            if ($loader instanceof DirectoryAwareLoaderInterface) {
                $loader = $loader->forDirectory($this->currentDir);
            }

            if (!$loader instanceof self) {
                return $loader->load($resource$type);
            }

            if (null !== $this->currentDir) {
                $resource = $loader->getLocator()->locate($resource$this->currentDir, false);
            }

            $resources = \is_array($resource) ? $resource : [$resource];
            
Home | Imprint | This part of the site doesn't use cookies.