Composer updated
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
e655732458
commit
0280cff66f
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitAdminAudit
|
class ComposerStaticInitAdminAudit
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\AdminAudit\\' => 15,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -37,7 +34,7 @@ class ComposerStaticInitAdminAudit
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitAdminAudit::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitAdminAudit::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitAdminAudit::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitAdminAudit::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitAdminAudit::$classMap;
|
$loader->classMap = ComposerStaticInitAdminAudit::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitComments
|
class ComposerStaticInitComments
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Comments\\' => 13,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -37,7 +34,7 @@ class ComposerStaticInitComments
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitComments::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitComments::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitComments::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitComments::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitComments::$classMap;
|
$loader->classMap = ComposerStaticInitComments::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitDAV
|
class ComposerStaticInitDAV
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\DAV\\' => 8,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -169,7 +166,7 @@ class ComposerStaticInitDAV
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitDAV::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitDAV::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitDAV::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitDAV::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitDAV::$classMap;
|
$loader->classMap = ComposerStaticInitDAV::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitEncryption
|
class ComposerStaticInitEncryption
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Encryption\\' => 15,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -53,7 +50,7 @@ class ComposerStaticInitEncryption
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitEncryption::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitEncryption::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitEncryption::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitEncryption::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitEncryption::$classMap;
|
$loader->classMap = ComposerStaticInitEncryption::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitFederatedFileSharing
|
class ComposerStaticInitFederatedFileSharing
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\FederatedFileSharing\\' => 25,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -38,7 +35,7 @@ class ComposerStaticInitFederatedFileSharing
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitFederatedFileSharing::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitFederatedFileSharing::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitFederatedFileSharing::$classMap;
|
$loader->classMap = ComposerStaticInitFederatedFileSharing::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitFederation
|
class ComposerStaticInitFederation
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Federation\\' => 15,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -40,7 +37,7 @@ class ComposerStaticInitFederation
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitFederation::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitFederation::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitFederation::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitFederation::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitFederation::$classMap;
|
$loader->classMap = ComposerStaticInitFederation::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitFiles
|
class ComposerStaticInitFiles
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Files\\' => 10,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -53,7 +50,7 @@ class ComposerStaticInitFiles
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitFiles::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitFiles::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitFiles::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitFiles::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitFiles::$classMap;
|
$loader->classMap = ComposerStaticInitFiles::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitFiles_Sharing
|
class ComposerStaticInitFiles_Sharing
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Files_Sharing\\' => 18,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -74,7 +71,7 @@ class ComposerStaticInitFiles_Sharing
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitFiles_Sharing::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitFiles_Sharing::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitFiles_Sharing::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitFiles_Sharing::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitFiles_Sharing::$classMap;
|
$loader->classMap = ComposerStaticInitFiles_Sharing::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitFiles_Trashbin
|
class ComposerStaticInitFiles_Trashbin
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Files_Trashbin\\' => 19,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -40,7 +37,7 @@ class ComposerStaticInitFiles_Trashbin
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitFiles_Trashbin::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitFiles_Trashbin::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitFiles_Trashbin::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitFiles_Trashbin::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitFiles_Trashbin::$classMap;
|
$loader->classMap = ComposerStaticInitFiles_Trashbin::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitFiles_Versions
|
class ComposerStaticInitFiles_Versions
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Files_Versions\\' => 19,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -37,7 +34,7 @@ class ComposerStaticInitFiles_Versions
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitFiles_Versions::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitFiles_Versions::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitFiles_Versions::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitFiles_Versions::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitFiles_Versions::$classMap;
|
$loader->classMap = ComposerStaticInitFiles_Versions::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitLookupServerConnector
|
class ComposerStaticInitLookupServerConnector
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\LookupServerConnector\\' => 26,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -28,7 +25,7 @@ class ComposerStaticInitLookupServerConnector
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitLookupServerConnector::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitLookupServerConnector::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitLookupServerConnector::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitLookupServerConnector::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitLookupServerConnector::$classMap;
|
$loader->classMap = ComposerStaticInitLookupServerConnector::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitOAuth2
|
class ComposerStaticInitOAuth2
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\OAuth2\\' => 11,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -36,7 +33,7 @@ class ComposerStaticInitOAuth2
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitOAuth2::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitOAuth2::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitOAuth2::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitOAuth2::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitOAuth2::$classMap;
|
$loader->classMap = ComposerStaticInitOAuth2::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitProvisioning_API
|
class ComposerStaticInitProvisioning_API
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Provisioning_API\\' => 21,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -33,7 +30,7 @@ class ComposerStaticInitProvisioning_API
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitProvisioning_API::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitProvisioning_API::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitProvisioning_API::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitProvisioning_API::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitProvisioning_API::$classMap;
|
$loader->classMap = ComposerStaticInitProvisioning_API::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitShareByMail
|
class ComposerStaticInitShareByMail
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\ShareByMail\\' => 16,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -33,7 +30,7 @@ class ComposerStaticInitShareByMail
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitShareByMail::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitShareByMail::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitShareByMail::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitShareByMail::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitShareByMail::$classMap;
|
$loader->classMap = ComposerStaticInitShareByMail::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitSystemTags
|
class ComposerStaticInitSystemTags
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\SystemTags\\' => 15,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -31,7 +28,7 @@ class ComposerStaticInitSystemTags
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitSystemTags::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitSystemTags::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitSystemTags::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitSystemTags::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitSystemTags::$classMap;
|
$loader->classMap = ComposerStaticInitSystemTags::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitTesting
|
class ComposerStaticInitTesting
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\Testing\\' => 12,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -32,7 +29,7 @@ class ComposerStaticInitTesting
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitTesting::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitTesting::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitTesting::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitTesting::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitTesting::$classMap;
|
$loader->classMap = ComposerStaticInitTesting::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitTwoFactorBackupCodes
|
class ComposerStaticInitTwoFactorBackupCodes
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\TwoFactorBackupCodes\\' => 25,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -38,7 +35,7 @@ class ComposerStaticInitTwoFactorBackupCodes
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitTwoFactorBackupCodes::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitTwoFactorBackupCodes::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitTwoFactorBackupCodes::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitTwoFactorBackupCodes::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitTwoFactorBackupCodes::$classMap;
|
$loader->classMap = ComposerStaticInitTwoFactorBackupCodes::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitUpdateNotification
|
class ComposerStaticInitUpdateNotification
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\UpdateNotification\\' => 23,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -32,7 +29,7 @@ class ComposerStaticInitUpdateNotification
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitUpdateNotification::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitUpdateNotification::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitUpdateNotification::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitUpdateNotification::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitUpdateNotification::$classMap;
|
$loader->classMap = ComposerStaticInitUpdateNotification::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInitUser_LDAP
|
class ComposerStaticInitUser_LDAP
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OCA\\User_LDAP\\' => 14,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -82,7 +79,7 @@ class ComposerStaticInitUser_LDAP
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInitUser_LDAP::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInitUser_LDAP::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInitUser_LDAP::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInitUser_LDAP::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInitUser_LDAP::$classMap;
|
$loader->classMap = ComposerStaticInitUser_LDAP::$classMap;
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,8 @@ namespace Composer\Autoload;
|
||||||
class ClassLoader
|
class ClassLoader
|
||||||
{
|
{
|
||||||
// PSR-4
|
// PSR-4
|
||||||
private $prefixLengthsPsr4 = array();
|
private $firstCharsPsr4 = array();
|
||||||
|
private $prefixLengthsPsr4 = array(); // For BC with legacy static maps
|
||||||
private $prefixDirsPsr4 = array();
|
private $prefixDirsPsr4 = array();
|
||||||
private $fallbackDirsPsr4 = array();
|
private $fallbackDirsPsr4 = array();
|
||||||
|
|
||||||
|
@ -170,11 +171,10 @@ class ClassLoader
|
||||||
}
|
}
|
||||||
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
} elseif (!isset($this->prefixDirsPsr4[$prefix])) {
|
||||||
// Register directories for a new namespace.
|
// Register directories for a new namespace.
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
} elseif ($prepend) {
|
} elseif ($prepend) {
|
||||||
// Prepend directories for an already registered namespace.
|
// Prepend directories for an already registered namespace.
|
||||||
|
@ -221,11 +221,10 @@ class ClassLoader
|
||||||
if (!$prefix) {
|
if (!$prefix) {
|
||||||
$this->fallbackDirsPsr4 = (array) $paths;
|
$this->fallbackDirsPsr4 = (array) $paths;
|
||||||
} else {
|
} else {
|
||||||
$length = strlen($prefix);
|
if ('\\' !== substr($prefix, -1)) {
|
||||||
if ('\\' !== $prefix[$length - 1]) {
|
|
||||||
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
|
||||||
}
|
}
|
||||||
$this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
|
$this->firstCharsPsr4[$prefix[0]] = true;
|
||||||
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
$this->prefixDirsPsr4[$prefix] = (array) $paths;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -373,15 +372,15 @@ class ClassLoader
|
||||||
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
$logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
|
||||||
|
|
||||||
$first = $class[0];
|
$first = $class[0];
|
||||||
if (isset($this->prefixLengthsPsr4[$first])) {
|
if (isset($this->firstCharsPsr4[$first]) || isset($this->prefixLengthsPsr4[$first])) {
|
||||||
$subPath = $class;
|
$subPath = $class;
|
||||||
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
while (false !== $lastPos = strrpos($subPath, '\\')) {
|
||||||
$subPath = substr($subPath, 0, $lastPos);
|
$subPath = substr($subPath, 0, $lastPos);
|
||||||
$search = $subPath.'\\';
|
$search = $subPath.'\\';
|
||||||
if (isset($this->prefixDirsPsr4[$search])) {
|
if (isset($this->prefixDirsPsr4[$search])) {
|
||||||
|
$pathEnd = DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $lastPos + 1);
|
||||||
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
foreach ($this->prefixDirsPsr4[$search] as $dir) {
|
||||||
$length = $this->prefixLengthsPsr4[$first][$search];
|
if (file_exists($file = $dir . $pathEnd)) {
|
||||||
if (file_exists($file = $dir . DIRECTORY_SEPARATOR . substr($logicalPathPsr4, $length))) {
|
|
||||||
return $file;
|
return $file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -650,6 +650,7 @@ return array(
|
||||||
'OC\\Files\\ObjectStore\\S3' => $baseDir . '/lib/private/Files/ObjectStore/S3.php',
|
'OC\\Files\\ObjectStore\\S3' => $baseDir . '/lib/private/Files/ObjectStore/S3.php',
|
||||||
'OC\\Files\\ObjectStore\\S3ConnectionTrait' => $baseDir . '/lib/private/Files/ObjectStore/S3ConnectionTrait.php',
|
'OC\\Files\\ObjectStore\\S3ConnectionTrait' => $baseDir . '/lib/private/Files/ObjectStore/S3ConnectionTrait.php',
|
||||||
'OC\\Files\\ObjectStore\\S3ObjectTrait' => $baseDir . '/lib/private/Files/ObjectStore/S3ObjectTrait.php',
|
'OC\\Files\\ObjectStore\\S3ObjectTrait' => $baseDir . '/lib/private/Files/ObjectStore/S3ObjectTrait.php',
|
||||||
|
'OC\\Files\\ObjectStore\\S3Signature' => $baseDir . '/lib/private/Files/ObjectStore/S3Signature.php',
|
||||||
'OC\\Files\\ObjectStore\\StorageObjectStore' => $baseDir . '/lib/private/Files/ObjectStore/StorageObjectStore.php',
|
'OC\\Files\\ObjectStore\\StorageObjectStore' => $baseDir . '/lib/private/Files/ObjectStore/StorageObjectStore.php',
|
||||||
'OC\\Files\\ObjectStore\\Swift' => $baseDir . '/lib/private/Files/ObjectStore/Swift.php',
|
'OC\\Files\\ObjectStore\\Swift' => $baseDir . '/lib/private/Files/ObjectStore/Swift.php',
|
||||||
'OC\\Files\\Search\\SearchBinaryOperator' => $baseDir . '/lib/private/Files/Search/SearchBinaryOperator.php',
|
'OC\\Files\\Search\\SearchBinaryOperator' => $baseDir . '/lib/private/Files/Search/SearchBinaryOperator.php',
|
||||||
|
|
|
@ -6,14 +6,8 @@ namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $firstCharsPsr4 = array (
|
||||||
'O' =>
|
'O' => true,
|
||||||
array (
|
|
||||||
'OC\\Settings\\' => 12,
|
|
||||||
'OC\\Core\\' => 8,
|
|
||||||
'OC\\' => 3,
|
|
||||||
'OCP\\' => 4,
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
public static $prefixDirsPsr4 = array (
|
public static $prefixDirsPsr4 = array (
|
||||||
|
@ -680,6 +674,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
||||||
'OC\\Files\\ObjectStore\\S3' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/S3.php',
|
'OC\\Files\\ObjectStore\\S3' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/S3.php',
|
||||||
'OC\\Files\\ObjectStore\\S3ConnectionTrait' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/S3ConnectionTrait.php',
|
'OC\\Files\\ObjectStore\\S3ConnectionTrait' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/S3ConnectionTrait.php',
|
||||||
'OC\\Files\\ObjectStore\\S3ObjectTrait' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/S3ObjectTrait.php',
|
'OC\\Files\\ObjectStore\\S3ObjectTrait' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/S3ObjectTrait.php',
|
||||||
|
'OC\\Files\\ObjectStore\\S3Signature' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/S3Signature.php',
|
||||||
'OC\\Files\\ObjectStore\\StorageObjectStore' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/StorageObjectStore.php',
|
'OC\\Files\\ObjectStore\\StorageObjectStore' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/StorageObjectStore.php',
|
||||||
'OC\\Files\\ObjectStore\\Swift' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/Swift.php',
|
'OC\\Files\\ObjectStore\\Swift' => __DIR__ . '/../../..' . '/lib/private/Files/ObjectStore/Swift.php',
|
||||||
'OC\\Files\\Search\\SearchBinaryOperator' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchBinaryOperator.php',
|
'OC\\Files\\Search\\SearchBinaryOperator' => __DIR__ . '/../../..' . '/lib/private/Files/Search/SearchBinaryOperator.php',
|
||||||
|
@ -989,7 +984,7 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
|
||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$prefixLengthsPsr4;
|
$loader->firstCharsPsr4 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$firstCharsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$classMap;
|
$loader->classMap = ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c::$classMap;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue