Go to the source code of this file.
|
| SimpleSAMLphp |
| Temporary autoloader to ensure compatibility with old, non-PSR-2 compliant classes.
|
|
|
| temporaryLoader ($class) |
| This temporary autoloader allows loading classes with their old-style names (SimpleSAML_Path_Something) even if they have been migrated to namespaces, by registering an alias for the new class. More...
|
|
◆ temporaryLoader()
temporaryLoader |
( |
|
$class | ) |
|
This temporary autoloader allows loading classes with their old-style names (SimpleSAML_Path_Something) even if they have been migrated to namespaces, by registering an alias for the new class.
If the class has not yet been migrated, the autoloader will then try to load it.
- Parameters
-
string | $class | The full name of the class using underscores to separate the elements of the path, and starting with 'SimpleSAML_'. |
- Deprecated:
- This function will be removed in SSP 2.0.
Definition at line 20 of file _autoload_modules.php.
References $file, $new, $path, array, and SimpleSAML\Logger\warning().
23 if (strstr($class,
'XMLSec')) {
24 if (class_exists(
'\\RobRichards\\XMLSecLibs\\'.$class,
true)) {
25 class_alias(
'\\RobRichards\\XMLSecLibs\\'.$class, $class);
30 if (!strstr($class,
'SimpleSAML_')) {
37 'SimpleSAML_Metadata_MetaDataStorageHandlerMDX' =>
'SimpleSAML_Metadata_Sources_MDQ',
38 'SimpleSAML_Logger_LoggingHandlerSyslog' =>
'SimpleSAML_Logger_SyslogLoggingHandler',
39 'SimpleSAML_Logger_LoggingHandlerErrorLog' =>
'SimpleSAML_Logger_ErrorLogLoggingHandler',
40 'SimpleSAML_Logger_LoggingHandlerFile' =>
'SimpleSAML_Logger_FileLoggingHandler',
41 'SimpleSAML_Logger_LoggingHandler' =>
'SimpleSAML_Logger_LoggingHandlerInterface',
42 'SimpleSAML_IdP_LogoutHandler' =>
'SimpleSAML_IdP_LogoutHandlerInterface',
43 'SimpleSAML_IdP_LogoutIFrame' =>
'SimpleSAML_IdP_IFrameLogoutHandler',
44 'SimpleSAML_IdP_LogoutTraditional' =>
'SimpleSAML_IdP_TraditionalLogoutHandler',
46 if (array_key_exists($class, $renamed)) {
48 $class = $renamed[$class];
52 $path = explode(
'_', $class);
53 $file = dirname(__FILE__).DIRECTORY_SEPARATOR.join(DIRECTORY_SEPARATOR,
$path).
'.php';
54 if (file_exists(
$file)) {
59 if (class_exists($class,
false) || interface_exists($class,
false)) {
65 if (class_exists(
$new,
false) || interface_exists(
$new,
false)) {
67 class_alias(
$new, $original);
Create styles array
The data for the language used.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file