aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/composer/ClassLoader.php
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2023-01-05 11:35:15 +0100
committerMario <mario@mariovavti.com>2023-01-05 11:35:15 +0100
commitedcb0631aa441f36cfca2384d26a622a945c6e63 (patch)
treead80b8b305583d3a602d6d62a69da7c905a46357 /vendor/composer/ClassLoader.php
parentbc361e64693e48dab4e034dba0c73f0dbc476bc6 (diff)
downloadvolse-hubzilla-edcb0631aa441f36cfca2384d26a622a945c6e63.tar.gz
volse-hubzilla-edcb0631aa441f36cfca2384d26a622a945c6e63.tar.bz2
volse-hubzilla-edcb0631aa441f36cfca2384d26a622a945c6e63.zip
composer dump autoload
Diffstat (limited to 'vendor/composer/ClassLoader.php')
-rw-r--r--vendor/composer/ClassLoader.php31
1 files changed, 16 insertions, 15 deletions
diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php
index afef3fa2a..3a8ed4886 100644
--- a/vendor/composer/ClassLoader.php
+++ b/vendor/composer/ClassLoader.php
@@ -42,6 +42,9 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
+ /** @var \Closure(string):void */
+ private $includeFile;
+
/** @var ?string */
private $vendorDir;
@@ -106,6 +109,18 @@ class ClassLoader
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
+
+ /**
+ * Scope isolated include.
+ *
+ * Prevents access to $this/self from included files.
+ *
+ * @param string $file
+ * @return void
+ */
+ $this->includeFile = static function($file) {
+ include $file;
+ };
}
/**
@@ -425,7 +440,7 @@ class ClassLoader
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
- includeFile($file);
+ ($this->includeFile)($file);
return true;
}
@@ -556,17 +571,3 @@ class ClassLoader
return false;
}
}
-
-/**
- * Scope isolated include.
- *
- * Prevents access to $this/self from included files.
- *
- * @param string $file
- * @return void
- * @private
- */
-function includeFile($file)
-{
- include $file;
-}