public function addRule($regex, $target = null, $params = null) { $this->rules[] = array($regex, $target, $params); return $this; }