* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\DependencyInjection\Loader; use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; /** * PhpFileLoader loads service definitions from a PHP file. * * The PHP file is required and the $container variable can be * used within the file to change the container. * * @author Fabien Potencier */ class PhpFileLoader extends FileLoader { /** * {@inheritdoc} */ 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->fileExists($path); // the closure forbids access to the private scope in the included file $load = \Closure::bind(function ($path) use ($container, $loader, $resource, $type) { return include $path; }, $this, ProtectedPhpFileLoader::class); $callback = $load($path); if ($callback instanceof \Closure) { $callback(new ContainerConfigurator($this->container, $this, $this->instanceof, $path, $resource), $this->container, $this); } } /** * {@inheritdoc} */ public function supports($resource, $type = null) { if (!is_string($resource)) { return false; } if (null === $type && 'php' === pathinfo($resource, PATHINFO_EXTENSION)) { return true; } return 'php' === $type; } } /** * @internal */ final class ProtectedPhpFileLoader extends PhpFileLoader { } __halt_compiler();----SIGNATURE:----atdSgcaNl8ZyFvJQJocYKKuX/mlnoullLrROx89igYHQznp0DNdj8S+F8tmXS90O+9a1oPpcGMMV9H4b9tpfX9FiEgmL+R8ONy1SdlOpBaJaKp8wPV7vulfcuXg1hJYmM4kWqzZojujjv2g+CJ8I/ZZeP8043Pg4g6V8KDEN6hGOyac6izW6nltx1NH0w/t6yl8u8Q1cJTEtjY7Nq3swZsWLFXB+lTJ0YTu5iTTNIm3IQ+Ris5bKKfvhq/AfOAmWPqDDYP0MM18zN1fTiodIn9Exy0onuebXTSaIrS41bPJ5DZJi2IV2dRjjGk4U6hKyrwEs3XqITQKskkYnwaKLRJhpS1mKIyFBf+624ykp8zVbjY5RSYtHDsHnvjOWn/+3kbBPDMpi2IwSYRTjujQNFj9HHDDlX0eaZ7uvFSvlew8cBLbEyw4ik1hTnVeYoeyT0AWEBstUG9TrHH3b8iGT/c7hl7hMao4WR6zo347Cdyu2UjynoIdNwMvGKBPaSDOBoRcEw5F2Dsiq4OKoKhmceL8tGWvNSIie9uBX5zejJ+AJ3A9mdJ3G24YpQSTa+H10E25tHYdH0ZkZ2Cq4SgOZbCGzmpG7Kw+Stbqgmu0TKr5o3ChjRSV/rgfl44ytUc2zuEH1UTM4wxX446e7xNGVACF7UmqXVznBvZxYf9uJ7Ig=----ATTACHMENT:----NjM2MTMyMzk3OTg2ODgyNCAyMTUxNjkyNjg3MTcwODggOTIwODkzMDQwMDI4MTMwMg==