public function PhpFileLoader::load in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/symfony/routing/Loader/PhpFileLoader.php \Symfony\Component\Routing\Loader\PhpFileLoader::load()
- 8.0 vendor/symfony/translation/Loader/PhpFileLoader.php \Symfony\Component\Translation\Loader\PhpFileLoader::load()
- 8.0 vendor/symfony/dependency-injection/Loader/PhpFileLoader.php \Symfony\Component\DependencyInjection\Loader\PhpFileLoader::load()
Same name and namespace in other branches
- 8 vendor/symfony/dependency-injection/Loader/PhpFileLoader.php \Symfony\Component\DependencyInjection\Loader\PhpFileLoader::load()
File
- vendor/
symfony/ dependency-injection/ Loader/ PhpFileLoader.php, line 29
Class
- PhpFileLoader
- PhpFileLoader loads service definitions from a PHP file.
Namespace
Symfony\Component\DependencyInjection\LoaderCode
public function load($resource, $type = null) {
// the container and loader variables are exposed to the included file below
$container = $this->container;
$loader = $this;
$path = $this->locator
->locate($resource);
$this
->setCurrentDir(dirname($path));
$this->container
->addResource(new FileResource($path));
include $path;
}