Skip to content

Commit

Permalink
Update on 2021.05.26
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagosampaio committed May 26, 2021
1 parent 8642126 commit c2bab25
Show file tree
Hide file tree
Showing 687 changed files with 61,643 additions and 35,093 deletions.
2,042 changes: 1,351 additions & 691 deletions composer.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion var/vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitf0f44435c8d49a7d9a746b4013a2b31e::getLoader();
return ComposerAutoloaderInit409ddd25b95e4a6a5f5dc562cc6779cc::getLoader();
2 changes: 1 addition & 1 deletion var/vendor/bin/composer
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use Composer\XdebugHandler\XdebugHandler;
error_reporting(-1);

// Restart without Xdebug
$xdebug = new XdebugHandler('Composer', '--ansi');
$xdebug = new XdebugHandler('Composer');
$xdebug->check();
unset($xdebug);

Expand Down
38 changes: 36 additions & 2 deletions var/vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@
*
* @author Fabien Potencier <fabien@symfony.com>
* @author Jordi Boggiano <j.boggiano@seld.be>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
* @see https://www.php-fig.org/psr/psr-0/
* @see https://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
private $vendorDir;

// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
Expand All @@ -57,6 +59,13 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;

private static $registeredLoaders = array();

public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}

public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
Expand Down Expand Up @@ -300,6 +309,17 @@ public function getApcuPrefix()
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);

if (null === $this->vendorDir) {
return;
}

if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}

/**
Expand All @@ -308,6 +328,10 @@ public function register($prepend = false)
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));

if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}

/**
Expand Down Expand Up @@ -367,6 +391,16 @@ public function findFile($class)
return $file;
}

/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}

private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup
Expand Down
Loading

0 comments on commit c2bab25

Please sign in to comment.