Commit d67ecb5a authored by Alex Ne's avatar Alex Ne

1.0.5

parent d43229a5
<?php
if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR);
if ( ! defined('DS')) {define('DS', DIRECTORY_SEPARATOR);}
spl_autoload_register(
function ($className)
{
$className = str_replace("\\", "_", $className);
$classPath = explode('_', $className);
if ( array_shift( $classPath ) != 'X') return;
if ( ctype_digit( end( $classPath ) ) ) $V = "_" . array_pop($classPath); else $V = ""; // Version Control
$filePath = dirname(__FILE__) . DS . implode(DS, $classPath) . $V . '.php';
if ( count($classPath) == 0 ) $classPath[] = "X";
if ( file_exists($filePath) ) require_once($filePath);
function ($class_name) {
$class_name = str_replace("\\", "_", $class_name);
$class_path = explode('_', $class_name);
if (array_shift($class_path) != 'X') {return;}
if (ctype_digit(end($class_path))) {$v = "_" . array_pop($class_path);} else { $v = "";}
// Version Control
$file_path = dirname(__FILE__) . DS . implode(DS, $class_path) . $v . '.php';
if (count($class_path) == 0) {$class_path[] = "X";}
if (file_exists($file_path)) {require_once ($file_path);}
}
);
?>
\ No newline at end of file
......@@ -7,11 +7,11 @@
"email": "xfilee@gmail.com"
}
],
"version": "1.0.3-dev",
"require": {},
"version": "1.0.5",
"require": {"php": "^5.6 || ^7.0"},
"autoload": {
"files": [
"_autoload.php"
"autoload.php"
]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment