Crummy\Phlack\Bot\AbstractBot::setMatcher PHP Метод

setMatcher() публичный Метод

public setMatcher ( Crummy\Phlack\Common\Matcher\MatcherInterface $matcher )
$matcher Crummy\Phlack\Common\Matcher\MatcherInterface
    public function setMatcher($matcher)
    {
        if (!$matcher instanceof Matcher\MatcherInterface && !is_callable($matcher)) {
            throw new InvalidArgumentException(sprintf('The matcher must be callable, or implement \\Crummy\\Phlack\\Common\\Matcher\\MatcherInterface. "%" given.', is_object($matcher) ? get_class($matcher) : gettype($matcher)));
        }
        $this->matcher = $matcher;
        return $this;
    }