You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
<?php /** * @copyright NetMonsters <team@netmonsters.ru> * @link http://netmonsters.ru * @package Majestic * @subpackage Load * @since 2010-02-24 * @version SVN: $Id$ * @filesource $URL$ */
class Load { static protected $autoload; static public function autoload($class) { if (! isset(self::$autoload[$class])) { throw new MJException('There is no such class "' . $class . '" in autoload.'); } require(PATH . self::$autoload[$class]); } static public function setAutoloadFrom($file) { if (! file_exists($file)) { throw new MJException('Autoload source doesn\'t exists! Try to generate it!'); } self::$autoload = require($file); } static public function getFilePath($class) { return self::$autoload[$class]; } }
|