Commit b3c539f4 authored by AlexNe's avatar AlexNe Committed by GitHub

Merge pull request #1 from AlexNe/version_2/beta

Version 2/beta
parents 0384f319 c7380dd7
<?php
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);
}
);
?>
\ No newline at end of file
<?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
{
"name": "xfile/x-lib",
"description": "Private lib for me",
"keywords": ["xlib","x-lib","xfile"],
"type": "library",
"authors": [
{
"name": "Александр Нежинский",
"email": "xfilee@gmail.com"
"name": "Oleksandr Nizhynskyi",
"email": "xfilee@gmail.com",
"role": "Developer"
}
],
"version": "1.0.3-dev",
"require": {},
"license": "Apache-2.0",
"version": "1.0.8",
"require": {"php": ">=5.6"},
"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