PhpFileLoader.php in Zircon Profile 8
File
vendor/symfony/dependency-injection/Loader/PhpFileLoader.php
View source
<?php
namespace Symfony\Component\DependencyInjection\Loader;
use Symfony\Component\Config\Resource\FileResource;
class PhpFileLoader extends FileLoader {
public function load($resource, $type = null) {
$container = $this->container;
$loader = $this;
$path = $this->locator
->locate($resource);
$this
->setCurrentDir(dirname($path));
$this->container
->addResource(new FileResource($path));
include $path;
}
public function supports($resource, $type = null) {
return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION);
}
}
Classes
Name |
Description |
PhpFileLoader |
PhpFileLoader loads service definitions from a PHP file. |