extract methods for apply context on oql

This commit is contained in:
acognet
2021-04-30 22:41:44 +02:00
parent d0d254ad59
commit 2cc4448a15
6 changed files with 68 additions and 87 deletions

View File

@@ -42,8 +42,6 @@ namespace Composer\Autoload;
*/
class ClassLoader
{
private $vendorDir;
// PSR-4
private $prefixLengthsPsr4 = array();
private $prefixDirsPsr4 = array();
@@ -59,13 +57,6 @@ class ClassLoader
private $missingClasses = array();
private $apcuPrefix;
private static $registeredLoaders = array();
public function __construct($vendorDir = null)
{
$this->vendorDir = $vendorDir;
}
public function getPrefixes()
{
if (!empty($this->prefixesPsr0)) {
@@ -309,17 +300,6 @@ class ClassLoader
public function register($prepend = false)
{
spl_autoload_register(array($this, 'loadClass'), true, $prepend);
if (null === $this->vendorDir) {
return;
}
if ($prepend) {
self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
} else {
unset(self::$registeredLoaders[$this->vendorDir]);
self::$registeredLoaders[$this->vendorDir] = $this;
}
}
/**
@@ -328,10 +308,6 @@ class ClassLoader
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
@@ -391,16 +367,6 @@ class ClassLoader
return $file;
}
/**
* Returns the currently registered loaders indexed by their corresponding vendor directories.
*
* @return self[]
*/
public static function getRegisteredLoaders()
{
return self::$registeredLoaders;
}
private function findFileWithExtension($class, $ext)
{
// PSR-4 lookup

View File

@@ -371,6 +371,7 @@ return array(
'DBObjectSetComparator' => $baseDir . '/core/dbobjectset.class.php',
'DBProperty' => $baseDir . '/core/dbproperty.class.inc.php',
'DBSearch' => $baseDir . '/core/dbsearch.class.php',
'DBSearchHelper' => $baseDir . '/application/DBSearchHelper.php',
'DBUnionSearch' => $baseDir . '/core/dbunionsearch.class.php',
'DailyRotatingLogFileNameBuilder' => $baseDir . '/core/log.class.inc.php',
'Dashboard' => $baseDir . '/application/dashboard.class.inc.php',
@@ -1917,7 +1918,7 @@ return array(
'TemplateString' => $baseDir . '/core/templatestring.class.inc.php',
'TemplateStringPlaceholder' => $baseDir . '/core/templatestring.class.inc.php',
'ThemeHandler' => $baseDir . '/application/themehandler.class.inc.php',
'ThemeHandlerService' => $baseDir . '/application/themehandlerservice.class.inc.php',
'ThemeHandlerService' => $baseDir . '/application/themehandlerservice.class.inc.php',
'ToolsLog' => $baseDir . '/core/log.class.inc.php',
'Trigger' => $baseDir . '/core/trigger.class.inc.php',
'TriggerOnObject' => $baseDir . '/core/trigger.class.inc.php',

View File

@@ -25,7 +25,7 @@ class ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit0018331147de7601e7552f7da8e3bb8b', 'loadClassLoader'));
$includePaths = require __DIR__ . '/include_paths.php';

View File

@@ -601,6 +601,7 @@ class ComposerStaticInit0018331147de7601e7552f7da8e3bb8b
'DBObjectSetComparator' => __DIR__ . '/../..' . '/core/dbobjectset.class.php',
'DBProperty' => __DIR__ . '/../..' . '/core/dbproperty.class.inc.php',
'DBSearch' => __DIR__ . '/../..' . '/core/dbsearch.class.php',
'DBSearchHelper' => __DIR__ . '/../..' . '/application/DBSearchHelper.php',
'DBUnionSearch' => __DIR__ . '/../..' . '/core/dbunionsearch.class.php',
'DailyRotatingLogFileNameBuilder' => __DIR__ . '/../..' . '/core/log.class.inc.php',
'Dashboard' => __DIR__ . '/../..' . '/application/dashboard.class.inc.php',