foreach ($this->definitions['date'] as $handler) {
if ($handler->match($tokens, $this->definitions)) {
$goodTokens = array_values(array_filter($tokens, create_function('$o', 'return !$o->getTag("separator");')));
+ $this->debug($handler->handlerMethod, $goodTokens, $options);
return call_user_func(array($this, $handler->handlerMethod), $goodTokens, $options);
}
}
foreach ($this->definitions['anchor'] as $handler) {
if ($handler->match($tokens, $this->definitions)) {
$goodTokens = array_values(array_filter($tokens, create_function('$o', 'return !$o->getTag("separator");')));
+ $this->debug($handler->handlerMethod, $goodTokens, $options);
return call_user_func(array($this, $handler->handlerMethod), $goodTokens, $options);
}
}
foreach ($this->definitions['arrow'] as $handler) {
if ($handler->match($tokens, $this->definitions)) {
$goodTokens = array_values(array_filter($tokens, create_function('$o', 'return !$o->getTag("separator_at") && !$o->getTag("separator_slash_or_dash") && !$o->getTag("separator_comma");')));
+ $this->debug($handler->handlerMethod, $goodTokens, $options);
return call_user_func(array($this, $handler->handlerMethod), $goodTokens, $options);
}
}
foreach ($this->definitions['narrow'] as $handler) {
if ($handler->match($tokens, $this->definitions)) {
//good_tokens = tokens.select { |o| !o.get_tag Separator }
+ $this->debug($handler->handlerMethod, $tokens, $options);
return call_user_func(array($this, $handler->handlerMethod), $tokens, $options);
}
}
return null;
}
-
public function dayOrTime($dayStart, $timeTokens, $options)
{
$outerSpan = new Horde_Date_Span($dayStart, $dayStart->add(array('day' => 1)));
/*##########################################################################
+ # Logging Methods
+ ##########################################################################*/
+
+ public function debug($method, $args)
+ {
+ $args = func_get_args();
+ $method = array_shift($args);
+ // echo "$method\n";
+ }
+
+
+ /*##########################################################################
# Support Methods
##########################################################################*/