public function setActivePatterns($pattern, $name = null) { if (!$name) { $name = sizeof($this->patterns); } $this->patterns[$name] = $pattern; }