Commit d67ecb5a authored by Alex Ne's avatar Alex Ne

1.0.5

parent d43229a5
<?php <?php
if (!defined('DS')) define('DS', DIRECTORY_SEPARATOR); if ( ! defined('DS')) {define('DS', DIRECTORY_SEPARATOR);}
spl_autoload_register( spl_autoload_register(
function ($className) function ($class_name) {
{ $class_name = str_replace("\\", "_", $class_name);
$className = str_replace("\\", "_", $className); $class_path = explode('_', $class_name);
$classPath = explode('_', $className); if (array_shift($class_path) != 'X') {return;}
if ( array_shift( $classPath ) != 'X') return; if (ctype_digit(end($class_path))) {$v = "_" . array_pop($class_path);} else { $v = "";}
if ( ctype_digit( end( $classPath ) ) ) $V = "_" . array_pop($classPath); else $V = ""; // Version Control // Version Control
$filePath = dirname(__FILE__) . DS . implode(DS, $classPath) . $V . '.php'; $file_path = dirname(__FILE__) . DS . implode(DS, $class_path) . $v . '.php';
if ( count($classPath) == 0 ) $classPath[] = "X"; if (count($class_path) == 0) {$class_path[] = "X";}
if ( file_exists($filePath) ) require_once($filePath); if (file_exists($file_path)) {require_once ($file_path);}
} }
); );
?> ?>
\ No newline at end of file
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
"email": "xfilee@gmail.com" "email": "xfilee@gmail.com"
} }
], ],
"version": "1.0.3-dev", "version": "1.0.5",
"require": {}, "require": {"php": "^5.6 || ^7.0"},
"autoload": { "autoload": {
"files": [ "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