Created
January 8, 2015 04:02
-
-
Save drrobotnik/4e16b7eaff3ebaac5cb2 to your computer and use it in GitHub Desktop.
Revisions
-
drrobotnik created this gist
Jan 8, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ class autoloader { public static $loader; public static function init() { if (self::$loader == NULL) self::$loader = new self(); return self::$loader; } public function __construct() { spl_autoload_register( array($this,'commands') ); } public function commands( $class ) { set_include_path( plugin_dir_path( __FILE__ ).'commands/'); spl_autoload_extensions('.command.php'); spl_autoload($class); } } //call autoloader::init();