protected function XAutoloadWebTestCase::expectedAutoloadStackOrder in X Autoload 7.5
Same name and namespace in other branches
- 7.3 lib/Drupal/xautoload/Tests/XAutoloadWebTestCase.php \Drupal\xautoload\Tests\XAutoloadWebTestCase::expectedAutoloadStackOrder()
- 7.4 lib/Drupal/xautoload/Tests/XAutoloadWebTestCase.php \Drupal\xautoload\Tests\XAutoloadWebTestCase::expectedAutoloadStackOrder()
Parameters
string $cache_types: The autoloader modes that are enabled, e.g. array('apc' => 'apc', 'xcache' => 'xcache')
Return value
string[] Expected order of class loaders on the spl autoload stack for the given autoloader mode. Each represented by a string.
1 call to XAutoloadWebTestCase::expectedAutoloadStackOrder()
- XAutoloadWebTestCase::xautoloadCheckTestEnvironment in lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php
File
- lib/
Drupal/ xautoload/ Tests/ XAutoloadWebTestCase.php, line 192
Class
Namespace
Drupal\xautoload\TestsCode
protected function expectedAutoloadStackOrder($cache_types) {
if (!empty($cache_types['apc']) && extension_loaded('apc') && function_exists('apc_store')) {
$loader = 'Drupal\\xautoload\\ClassLoader\\ApcClassLoader->loadClass()';
}
elseif (!empty($cache_types['wincache']) && extension_loaded('wincache') && function_exists('wincache_ucache_get')) {
$loader = 'Drupal\\xautoload\\ClassLoader\\WinCacheClassLoader->loadClass()';
}
elseif (!empty($cache_types['xcache']) && extension_loaded('Xcache') && function_exists('xcache_get')) {
$loader = 'Drupal\\xautoload\\ClassLoader\\XCacheClassLoader->loadClass()';
}
else {
$loader = 'Drupal\\xautoload\\ClassFinder\\ClassFinder->loadClass()';
}
return array(
'drupal_autoload_class',
'drupal_autoload_interface',
$loader,
);
}