PHP Classes
elePHPant
Icontem

File: intortus/autoload.php

Recommend this page to a friend!
  Classes of martin barker  >  PHP JSON RPC Objective Server  >  intortus/autoload.php  >  Download  
File: intortus/autoload.php
Role: Auxiliary script
Content type: text/plain
Description: Autoloader for intortus Library
Class: PHP JSON RPC Objective Server
Handle API requests to a JSON RPC server
Author: By
Last change:
Date: 3 years ago
Size: 506 bytes
 

 

Contents

Class file image Download
<?php
DEFINE
("INTORTUS_AUTOLOADER_REGISTERED", true);
spl_autoload_register(function($className){
   
$classNSes = explode("\\", $className);
   
// the class being loaded is not of the intortus namespace
    // this autoloader should not handle it
   
if($classNSes[0] !== "intortus"){
        return
false;
    }
    unset(
$classNSes[0]);
   
$path = dirname(__file__);
   
$pathToCls = implode(DIRECTORY_SEPARATOR, $classNSes);
    require_once(
strtolower($path.DIRECTORY_SEPARATOR.$pathToCls.".php"));
},
true, false);
?>