예제 #1
0
 /**
  * @return $this
  */
 public function test()
 {
     Config::_getInstance()->load('UpgradeDB');
     if (!config('enabled', 'UpgradeDB')) {
         lang('disabled', 'UpgradeDB');
         exit;
     }
     Error::_getInstance()->flush()->_('verbosity', 'die');
     if (is_null($this->index()->run('test')->__())) {
         lang('upToDate', 'UpgradeDB');
         exit;
     }
     if (!copyContent(BASE_PATH . config('testContentPath', 'UpgradeDB'), BASE_PATH . config('contentPath', 'Default'))) {
         lang('copyContentFailure', 'UpgradeDB');
     }
     lang('copyContentSuccess', 'UpgradeDB');
     linefeed();
     return $this;
 }
예제 #2
0
 /**
  * @return bool|string
  */
 public function get()
 {
     if (!$this->traceFlag) {
         return false;
     }
     $status = $this->traceFlag;
     $this->traceFlag = false;
     $function = config('function', 'Debug');
     $return = "";
     foreach (func_get_args() as $arg) {
         if (config('echo', 'Debug')) {
             $function($arg);
             linefeed();
         } else {
             $return .= $function($arg, true);
         }
     }
     $this->traceFlag = $status;
     if (config('die', 'Debug')) {
         die;
     }
     return $return;
 }