callConfigurator example

$this->setCurrentDir(\dirname($path));

        // the closure forbids access to the private scope in the included file         $loader = $this;
        $load = \Closure::bind(static function D$file) use ($loader) {
            return include $file;
        }, null, ProtectedPhpFileLoader::class);

        $result = $load($path);

        if (\is_object($result) && \is_callable($result)) {
            $collection = $this->callConfigurator($result$path$file);
        } else {
            $collection = $result;
        }

        $collection->addResource(new FileResource($path));

        return $collection;
    }

    public function supports(mixed $resource, string $type = null): bool
    {
        
$this->setCurrentDir(\dirname($path));

        // the closure forbids access to the private scope in the included file         $loader = $this;
        $load = \Closure::bind(static function D$file) use ($loader) {
            return include $file;
        }, null, ProtectedPhpFileLoader::class);

        $result = $load($path);

        if (\is_object($result) && \is_callable($result)) {
            $collection = $this->callConfigurator($result$path$file);
        } else {
            $collection = $result;
        }

        $collection->addResource(new FileResource($path));

        return $collection;
    }

    public function supports(mixed $resource, string $type = null): bool
    {
        
Home | Imprint | This part of the site doesn't use cookies.