예제 #1
1
 public static function factory()
 {
     if (is_dir(ROOT . self::$_paths['path'])) {
         if (is_file(ROOT . self::$_paths['config'])) {
             if (!empty(self::$_instance)) {
                 return self::$_instance;
             } else {
                 return self::$_instance = new Automate(ROOT . self::$_paths['config']);
             }
         } else {
             self::log('E', 'The script need a file (kingsage.json) on directory (json) to run it');
             return FALSE;
         }
     } else {
         self::log('E', 'The script need a folder called "json" to run it');
         return FALSE;
     }
 }