Loading Please wait...

err Class Reference
[Error handler Module.]


Public Member Functions

 err ()
 __construct ()
 errTitleDict ($errNo)
 Returns the Error Title text By Error Number.
 errStyleDict ($errNo, $item)
 The Style Dictionary.
 implodeStyle ($srcList)
 Combine arrays to CSS like key: val; string.
 error ($errMsg)
 echo's the Error in Div utlizing the combine function
 catchThrownError ($errNo, $errMsg, $fileName, $lineNum)
 Catch Errors Thrown By PHP and Beautify it.Gets Called automatically whenever PHP throw's an error.

Data Fields

 $err_style = array()
 $rel_r = array()

Detailed Description

Error Handler Class of Zigmoyd

Definition at line 30 of file err.php.


Constructor & Destructor Documentation

err::__construct (  ) 

Definition at line 37 of file err.php.

Referenced by err().

00037                         {
00038     if(!defined('E_ZIGMOYD_ERROR'))define('E_ZIGMOYD_ERROR', E_USER_ERROR);
00039     if(!defined('E_ZIGMOYD_WARNING'))define('E_ZIGMOYD_WARNING', E_USER_WARNING);
00040     if(!defined('E_ZIGMOYD_NOTICE'))define('E_ZIGMOYD_NOTICE', E_USER_NOTICE);
00041   }


Member Function Documentation

err::err (  ) 

Definition at line 34 of file err.php.

References __construct().

00034                 {
00035     $this->__construct();
00036   }

Here is the call graph for this function:

err::errTitleDict ( errNo  ) 

Returns the Error Title text By Error Number.

Parameters:
$errNo int
Returns:
string

Definition at line 48 of file err.php.

Referenced by catchThrownError(), and error().

00048                                {
00049     $title = array();
00050     $title[E_ERROR] = "PHP Error";
00051     $title[E_WARNING] = "PHP Warning";
00052     $title[E_PARSE] = "PHP Parse Error";
00053     $title[E_NOTICE] = "PHP Notice";
00054     $title[E_CORE_ERROR] = "PHP Core Error";
00055     $title[E_CORE_WARNING] = "PHP Core Warning";
00056     $title[E_COMPILE_ERROR] = "PHP Compile Error";
00057     $title[E_COMPILE_WARNING] = "PHP Compile Warning";
00058     $title[E_USER_ERROR] = "Zigmoyd Error";
00059     $title[E_USER_WARNING] = "Zigmoyd Warning";
00060     $title[E_USER_NOTICE] = "Zigmoyd Notice";
00061     //$title[E_STRICT] = "PHP Strict Error";
00062     //$title[E_RECOVERABLE_ERROR] = "PHP Catchable Fatal Error";
00063     if(!isset($title[$errNo])){
00064       return false;
00065     }else{
00066       return $title[$errNo];
00067     }
00068   }

err::errStyleDict ( errNo,
item 
)

The Style Dictionary.

Builds the CSS e.g. style="" for error Divs

Parameters:
$errNo int
$item string
Returns:
string

Definition at line 76 of file err.php.

References implodeStyle().

00076                                       {
00077     $style = array();
00078     $style[E_WARNING] = array('x', 'title', 'msg');
00079     $style[E_NOTICE] = array('x', 'title', 'msg');
00080     $style[E_USER_ERROR] = array('x', 'title', 'msg');
00081     $style[E_USER_WARNING] = array('x', 'title', 'msg');
00082     $style[E_USER_NOTICE] = array('x', 'title', 'msg');
00083     //$style[E_STRICT] = array('x', 'title', 'msg');
00084     //$style[E_RECOVERABLE_ERROR] = array('x', 'title', 'msg');
00085     //{ E_USER_ERROR
00086     $style[E_USER_ERROR]['x'] = array(
00087       'color' => "#FFFFFF",
00088       'padding-right' => "5px",
00089       'border-right' => "5px solid #990000"
00090     );
00091     $style[E_USER_ERROR]['title'] = array(
00092       'padding' => "2px",
00093       'text-align' => "left",
00094       'background-color' => "#990000",
00095       'color' => "#FFF0F0",
00096       'border' => "2px solid #000000",
00097       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00098       'font-weight' => "bold",
00099       'font-size' => "12px",
00100       'margin-bottom' => "5px",
00101       'display' => "block"
00102     );
00103     $style[E_USER_ERROR]['msg'] = array(
00104       'padding' => "2px",
00105       'color' => "#990000",
00106       'text-align' => "left",
00107       'background-color' => "#FFF0F0",
00108       'border' => "1px solid #FFFFFF",
00109       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00110       'font-size' => "12px",
00111       'margin-bottom' => "5px",
00112       'margin-top' => "5px",
00113       'display' => "block"
00114     );
00115     //}
00116     //{ E_USER_WARNING
00117     $style[E_USER_WARNING]['x'] = array(
00118       'color' => "#FFFFFF",
00119       'padding-right' => "5px",
00120       'border-right' => "5px solid #9A6C09"
00121     );
00122     $style[E_USER_WARNING]['title'] = array(
00123       'padding' => "2px",
00124       'text-align' => "left",
00125       'background-color' => "#9A6C09",
00126       'color' => "#fdf6e8",
00127       'border' => "2px solid #885F08",
00128       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00129       'font-weight' => "bold",
00130       'font-size' => "12px",
00131       'margin-bottom' => "5px",
00132       'display' => "block"
00133     );
00134     $style[E_USER_WARNING]['msg'] = array(
00135       'padding' => "2px",
00136       'color' => "#9A6C09",
00137       'text-align' => "left",
00138       'background-color' => "#fdf6e8",
00139       'border' => "1px solid #FFFFFF",
00140       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00141       'font-size' => "12px",
00142       'margin-bottom' => "5px",
00143       'margin-top' => "5px",
00144       'display' => "block"
00145     );
00146     //}
00147     //{ E_USER_NOTICE
00148     $style[E_USER_NOTICE]['x'] =  array(
00149       'color' => "#E5FFEA",
00150       'padding-right' => "5px",
00151       'border-right' => "5px solid #4B7300"
00152     );
00153     $style[E_USER_NOTICE]['title'] =  array(
00154       'padding' => "2px",
00155       'text-align' => "left",
00156       'background-color' => "#4B7300",
00157       'color' => "#FAFFF5",
00158       'border' => "2px solid #4B7300",
00159       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00160       'font-weight' => "bold",
00161       'font-size' => "12px",
00162       'margin-bottom' => "5px",
00163       'display' => "block"
00164     );
00165     $style[E_USER_NOTICE]['msg'] = array(
00166       'padding' => "2px",
00167       'color' => "#4B7300",
00168       'text-align' => "left",
00169       'background-color' => "#FAFFF5",
00170       'border' => "1px solid #FAFFF5",
00171       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00172       'font-size' => "12px",
00173       'margin-bottom' => "5px",
00174       'margin-top' => "5px",
00175       'display' => "block"
00176     );
00177     //}
00178     //{ E_WARNING
00179     $style[E_WARNING]['x'] = array(
00180       'color' => "#FFE7E0",
00181       'padding-right' => "5px",
00182       'border-right' => "5px solid #BD5158"
00183     );
00184     $style[E_WARNING]['title'] = array(
00185       'padding' => "2px",
00186       'text-align' => "left",
00187       'background-color' => "#BD5158",
00188       'color' => "#FFE7E0",
00189       'border' => "2px solid #84383D",
00190       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00191       'font-weight' => "bold",
00192       'font-size' => "12px",
00193       'margin-bottom' => "5px",
00194       'display' => "block"
00195     );
00196     $style[E_WARNING]['msg'] = array(
00197       'padding' => "2px",
00198       'color' => "#BD5158",
00199       'text-align' => "left",
00200       'background-color' => "#FFE7E0",
00201       'border' => "1px solid #FFE7E0",
00202       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00203       'font-size' => "12px",
00204       'margin-bottom' => "5px",
00205       'margin-top' => "5px",
00206       'display' => "block"
00207     );
00208     //}
00209     //{ E_WARNING
00210     $style[E_NOTICE]['x'] = array(
00211       'color' => "#FFFFFF",
00212       'padding-right' => "5px",
00213       'border-right' => "5px solid #74009C"
00214     );
00215     $style[E_NOTICE]['title'] = array(
00216       'padding' => "2px",
00217       'text-align' => "left",
00218       'background-color' => "#74009C",
00219       'color' => "#F0ECF4",
00220       'border' => "2px solid #000000",
00221       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00222       'font-weight' => "bold",
00223       'font-size' => "12px",
00224       'margin-bottom' => "5px",
00225       'display' => "block"
00226     );
00227     $style[E_NOTICE]['msg'] = array(
00228       'padding' => "2px",
00229       'color' => "#74009C",
00230       'text-align' => "left",
00231       'background-color' => "#F0ECF4",
00232       'border' => "1px solid #FFFFFF",
00233       'font-family' => "Verdana, Arial, Helvetica, sans-serif",
00234       'font-size' => "12px",
00235       'margin-bottom' => "5px",
00236       'margin-top' => "5px",
00237       'display' => "block"
00238     );
00239     //}
00240     if(!isset($style[$errNo][$item])){
00241       return false;
00242     }else{
00243       return $this->implodeStyle($style[$errNo][$item]);
00244     }
00245   }

Here is the call graph for this function:

err::implodeStyle ( srcList  ) 

Combine arrays to CSS like key: val; string.

Parameters:
$srcList array
Returns:
string

Definition at line 252 of file err.php.

References $val.

Referenced by errStyleDict().

00252                                  {
00253     $str = "";
00254     foreach($srcList as $key => $val){$str .= $key.": ".$val.";";}
00255     return $str;
00256   }

err::error ( errMsg  ) 

echo's the Error in Div utlizing the combine function

Parameters:
$str string

Definition at line 262 of file err.php.

References errTitleDict().

00262                          {
00263     echo '<div style="'.$this->errStyleDict(E_USER_ERROR, 'title').'">';
00264     echo '<span style="'.$this->errStyleDict(E_USER_ERROR, 'x').'" onclick="this.parentNode.style.display=\'none\'" onmouseover="this.style.color=\'#F71D53\'" onmouseout="this.style.color=\'#FFFFFF\'">'.'X'.'</span>';
00265     echo $this->errTitleDict(E_USER_ERROR);
00266     echo '<div style="'.$this->errStyleDict(E_USER_ERROR, 'msg').'">';
00267     echo $errMsg."<br />";
00268     echo '</div>';
00269     echo '</div>';
00270   }

Here is the call graph for this function:

err::catchThrownError ( errNo,
errMsg,
fileName,
lineNum 
)

Catch Errors Thrown By PHP and Beautify it.Gets Called automatically whenever PHP throw's an error.

Parameters:
$errNo int
$errMsg string
$fileName string
$lineNum int
Returns:
void

Definition at line 280 of file err.php.

References errTitleDict().

00280                                                                  {
00281     if(!(error_reporting() == 0)){
00282       echo '<div style="'.$this->errStyleDict($errNo, 'title').'">'.endl;
00283       echo '<span style="'.$this->errStyleDict($errNo, 'x').'" onclick="this.parentNode.style.display=\'none\'" onmouseover="this.style.color=\'#F71D53\'" onmouseout="this.style.color=\'#FFFFFF\'">'.'X'.'</span>'.endl;
00284       echo $this->errTitleDict($errNo).endl;
00285       echo '<div style="'.$this->errStyleDict($errNo, 'msg').'">';
00286       echo "Error Message: &nbsp;<span style='font-weight: normal;'>".$errMsg."</span><br />".endl;
00287       echo "File: &nbsp;<code><span style=\"background-color: #FFFFFF;font-weight: normal;\">".$fileName."</span></code><br />".endl;
00288       echo "Line: &nbsp;<code><span style=\"background-color: #FFFFFF;font-weight: normal;\">".$lineNum."</span></code>".endl;
00289       echo '</div>'.endl;
00290       echo '</div>'.endl;
00291     }
00292   }

Here is the call graph for this function:


Field Documentation

err::$err_style = array()

Definition at line 31 of file err.php.

err::$rel_r = array()

Definition at line 32 of file err.php.


The documentation for this class was generated from the following file:

Generated on Mon Oct 27 23:53:02 2008 for zigmoyd.kdevelop by doxygen 1.5.6