TYPO3 CMS  TYPO3_6-2
PhpErrorCodeViewHelper.php
Go to the documentation of this file.
1 <?php
3 
21 
25  protected $levelNames = array(
26  E_ERROR => 'E_ERROR',
27  E_WARNING => 'E_WARNING',
28  E_PARSE => 'E_PARSE',
29  E_NOTICE => 'E_NOTICE',
30  E_CORE_ERROR => 'E_CORE_ERROR',
31  E_CORE_WARNING => 'E_CORE_WARNING',
32  E_COMPILE_ERROR => 'E_COMPILE_ERROR',
33  E_COMPILE_WARNING => 'E_COMPILE_WARNING',
34  E_USER_ERROR => 'E_USER_ERROR',
35  E_USER_WARNING => 'E_USER_WARNING',
36  E_USER_NOTICE => 'E_USER_NOTICE',
37  E_STRICT => 'E_STRICT',
38  E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR',
39  E_DEPRECATED => 'E_DEPRECATED',
40  E_USER_DEPRECATED => 'E_USER_DEPRECATED',
41  );
42 
49  public function render($phpErrorCode) {
50  $levels = array();
51  if (($phpErrorCode & E_ALL) == E_ALL) {
52  $levels[] = 'E_ALL';
53  $phpErrorCode &= ~E_ALL;
54  }
55  foreach ($this->levelNames as $level => $name) {
56  if (($phpErrorCode & $level) == $level) {
57  $levels[] = $name;
58  }
59  }
60 
61  $output = '';
62  if (!empty($levels)) {
63  $output = implode(' | ', $levels);
64  }
65 
66  return $output;
67  }
68 
69 }
if(!defined('ADODB_ERROR_HANDLER_TYPE')) define('ADODB_ERROR_HANDLER_TYPE' E_USER_ERROR