comparison vendor/symfony/routing/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 af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
34 * @return RouteCollection A RouteCollection instance 34 * @return RouteCollection A RouteCollection instance
35 */ 35 */
36 public function load($file, $type = null) 36 public function load($file, $type = null)
37 { 37 {
38 $path = $this->locator->locate($file); 38 $path = $this->locator->locate($file);
39 $this->setCurrentDir(dirname($path)); 39 $this->setCurrentDir(\dirname($path));
40 40
41 // the closure forbids access to the private scope in the included file 41 // the closure forbids access to the private scope in the included file
42 $loader = $this; 42 $loader = $this;
43 $load = \Closure::bind(function ($file) use ($loader) { 43 $load = \Closure::bind(function ($file) use ($loader) {
44 return include $file; 44 return include $file;
61 /** 61 /**
62 * {@inheritdoc} 62 * {@inheritdoc}
63 */ 63 */
64 public function supports($resource, $type = null) 64 public function supports($resource, $type = null)
65 { 65 {
66 return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type); 66 return \is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION) && (!$type || 'php' === $type);
67 } 67 }
68 } 68 }
69 69
70 /** 70 /**
71 * @internal 71 * @internal