示例#1
0
 public static function query($query, $debugName = NULL)
 {
     if (Options::debugMode()) {
         self::$queries[] = array('name' => $debugName, 'query' => $query);
     }
     $q = mysql_query($query);
     if ($q === false) {
         self::printQueries();
         trigger_error(__CLASS__ . ": " . mysql_error(), E_USER_ERROR);
     }
     return $q;
 }
示例#2
0
 public static function columns($type)
 {
     $columns = array();
     $class = new ReflectionClass($type);
     while (true) {
         $newColumns = $class->getStaticPropertyValue('columns', array());
         if (Options::debugMode()) {
             $intersection = array_intersect_key($columns, $newColumns);
             if (count($intersection)) {
                 $intersection = implode(', ', array_keys($intersection));
                 trigger_error(__CLASS__ . ": The following data-columns appear more than once in the class hierarchy of '{$type}': {$intersection}", E_USER_ERROR);
             }
         }
         $columns = array_merge($columns, $newColumns);
         if ($class->getName() == __CLASS__) {
             $columns['id'] = 'identifier';
             return $columns;
         }
         $class = $class->getParentClass();
     }
 }
示例#3
0
?>
</span> on line <span style="font-weight: bold;"><?php 
echo $error["line"];
?>
</span>
	</div>
	<div class="errorheader"><?php 
echo ucfirst($typeString[$error["number"]]);
?>
</div>
	<?php 
echo $error["message"];
?>
	<div class="endfloat"></div>
	<?php 
if (Options::debugMode()) {
    ?>
		<hr />
		<div class="backtrace">
			<table>
			<?php 
    foreach ($error['backtrace'] as $bt_id => $bt_info) {
        if ($bt_id > 0) {
            ?>
				<tr>
					<td style="text-align: right"><?php 
            echo $bt_id;
            ?>
:
					<td style="text-align:  left"><?php 
            if (isset($bt_info['file'])) {