Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/dependency-injection/Loader/PhpFileLoader.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
31 // the container and loader variables are exposed to the included file below | 31 // the container and loader variables are exposed to the included file below |
32 $container = $this->container; | 32 $container = $this->container; |
33 $loader = $this; | 33 $loader = $this; |
34 | 34 |
35 $path = $this->locator->locate($resource); | 35 $path = $this->locator->locate($resource); |
36 $this->setCurrentDir(dirname($path)); | 36 $this->setCurrentDir(\dirname($path)); |
37 $this->container->fileExists($path); | 37 $this->container->fileExists($path); |
38 | 38 |
39 // the closure forbids access to the private scope in the included file | 39 // the closure forbids access to the private scope in the included file |
40 $load = \Closure::bind(function ($path) use ($container, $loader, $resource, $type) { | 40 $load = \Closure::bind(function ($path) use ($container, $loader, $resource, $type) { |
41 return include $path; | 41 return include $path; |
51 /** | 51 /** |
52 * {@inheritdoc} | 52 * {@inheritdoc} |
53 */ | 53 */ |
54 public function supports($resource, $type = null) | 54 public function supports($resource, $type = null) |
55 { | 55 { |
56 if (!is_string($resource)) { | 56 if (!\is_string($resource)) { |
57 return false; | 57 return false; |
58 } | 58 } |
59 | 59 |
60 if (null === $type && 'php' === pathinfo($resource, PATHINFO_EXTENSION)) { | 60 if (null === $type && 'php' === pathinfo($resource, PATHINFO_EXTENSION)) { |
61 return true; | 61 return true; |