Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Phpcr\RedirectRoute::setPath PHP Method

setPath() public method

public setPath ( $pattern )
    public function setPath($pattern)
    {
        $len = strlen($this->getStaticPrefix());
        if (strncmp($this->getStaticPrefix(), $pattern, $len)) {
            throw new \InvalidArgumentException('You can not set a pattern for the route document that does not match its repository path. First move it to the correct path.');
        }
        return $this->setVariablePattern(substr($pattern, $len));
    }