public static function parseRunEndErrors()
 {
     $Errors =& p\getOption(p\ERRORS);
     if (!empty($Errors)) {
         p\log($Errors);
     }
 }
Exemple #2
0
 public function handleException($exception)
 {
     p\d($exception);
     $Errors =& p\getOption(p\ERRORS);
     $message = $exception->getMessage();
     $Errors[p\APP_ERRORS][] = $message;
     $Errors[p\APP_LAST_ERROR] = $message;
 }
Exemple #3
0
 public function setOutput()
 {
     $output = $this['output'];
     if (p\getOption(_VIEW_ENGINE) === 'json') {
         $output = 'debug_store';
     }
     if (!is_object($output)) {
         $outputParam = [];
         if (isset($this['level'])) {
             $outputParam['level'] = $this['level'];
         }
         $output = p\plug($output, $outputParam);
     }
     if (empty($output)) {
         return !trigger_error('[PMVC:PlugIn:Debug:getOutput] Get Output failded.', E_USER_WARNING);
     }
     if (!$output->is(__NAMESPACE__ . '\\DebugDumpInterface')) {
         return !trigger_error('[' . get_class($output) . '] is not a valid debug output object,' . 'expedted DebugDumpInterface. ' . print_r($output, true), E_USER_WARNING);
     }
     $this['output'] = $output;
     $this->_output = $output;
 }
Exemple #4
0
 function index($m, $f)
 {
     $this->_dot = \PMVC\plug('dotenv');
     $this->_underscore = \PMVC\plug('underscore');
     $configs = $this->_dot->getUnderscoreToArray('.env.dimension');
     $this->_folder = \PMVC\lastSlash(\PMVC\getOption('DIMENSION_FOLDER'));
     if (!\PMVC\realpath($this->_folder)) {
         return !trigger_error('Dimensions settings folder not exists. [' . $this->_folder . ']');
     }
     $this->_escape = \PMVC\value($configs, ['ESCAPE']);
     $allConfigs = $this->getConfigs('.dimension.base');
     foreach ($configs['DIMENSIONS'] as $dimension) {
         $dimensionConfigs = $this->processInputForOneDimension($f, $dimension);
         $allConfigs = array_replace_recursive($allConfigs, $dimensionConfigs);
     }
     \PMVC\dev($this->_inputs, DEBUG_KEY);
     if (isset($allConfigs['_'])) {
         $this->processConstantArray($allConfigs);
     }
     $go = $m['dump'];
     $go->set($allConfigs);
     return $go;
 }
Exemple #5
0
 public function SetConfig__view_engine_($subject)
 {
     $this->_change(p\getOption(_VIEW_ENGINE));
 }