/** * Parses a single line of a given backtrace. * * @param array $unparsed_line The raw line from `caller` or some backtrace. * @param array $options * @return Line The parsed backtrace line. */ public static function parse(array $unparsed_line, array $options = array()) { if (!isset($unparsed_line['file']) or empty($unparsed_line['file'])) { $unparsed_line['file'] = '{PHP internal call}'; } if (!isset($options['filters'])) { $options['filters'] = array(); } $filtered = Filter::callbacks($options['filters'], $unparsed_line); if ($filtered === NULL) { return; } // Extract the filtered line parameters extract($filtered + array('filtered_file' => NULL, 'filtered_line' => NULL, 'filtered_function' => NULL)); // Extract the original line parameters extract($unparsed_line + array('file' => '', 'line' => '', 'function' => '')); return new self($file, $line, $function, $filtered_file, $filtered_line, $filtered_function); }
private function filter(&$params) { if (empty($this->params_filters)) { return; } $params = Filter::params($this->params_filters, $params); }