in('')); switch($command) { case 'quit': case 'exit': return true; break; case 'models': $this->out('Model classes:'); $this->out('--------------'); foreach ($models as $model) { $this->out(" - {$model}"); } break; default: $tokens = token_get_all($command); $semicolon = FALSE; $return = TRUE; $ignore = FALSE; $braces = array(); $methods = array(); $ws_t = array(); $command = ''; foreach ($tokens as $idx => $token) { // Parse the tokens if (is_array($token)) { if (in_array($token[0], $this->ignore_list)) { $ignore = TRUE; } else if (in_array($token[0], $this->return_list)) { $return = FALSE; } else if (in_array($token[0], $this->continue_list)) { // everything is okay } else { $error = sprintf(">> Unknown tag: %d (%s): %s".PHP_EOL, $token[0], token_name($token[0]), $token[1]); } if ($ignore == TRUE) { $command .= $token[1] . " "; $ws_t[] = array("token" => $token[0], "value" => $token[1]); } } else { $ws_t[] = array("token" => $token, "value" => ''); $last_idx = count($ws_t) - 1; switch ($token) { case '(': break; case '{': break; case ')': break; case '}': break; } } } } } } } function fatal_error_handler($buffer) { if (ereg("(error:)(.+)(/","",$regs[2]); error_log($err); return "ERROR CAUGHT check log file"; } return $buffer; } function handle_error ($errno, $errstr, $errfile, $errline) { error_log("$errstr in $errfile on line $errline"); if($errno == FATAL || $errno == ERROR){ ob_end_flush(); echo "ERROR CAUGHT check log file"; exit(0); } } ?>