PhpFileLoader.php in Service Container 7.2
File
modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/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. |