All Data Structures Namespaces Files Functions Variables
autoload.php
Go to the documentation of this file.
<?php
function __autoload($className)
{
if (strpos($className, '\\') === false)
return FALSE;
list($namespace, $class) = explode('\\', $className, 2);
$path = null;
switch ($namespace)
{
case "Entity":
$path = "core/models/{$class}.php"; break;
case "Tools":
$path = "core/tools/{$class}.php"; break;
case "Controller":
$path = "core/controllers/{$class}.php"; break;
case "Exception":
$path = "core/exceptions/{$class}.php"; break;
}
if (file_exists($path))
include_once ($path);
return $path;
}
__autoload
__autoload($className)
Definition: autoload.php:8