public function setRequirement($key, $regex)
    {
        $this->requirements[$key] = $this->sanitizeRequirement($key, $regex);
        $this->compiled = null;

        return $this;
    }
public function setRequirement($key, $regex)
    {
        $this->requirements[$key] = $this->sanitizeRequirement($key, $regex);
        $this->compiled = null;

        return $this;
    }
public function setRequirement ( $ key , $ regex ) { $ this -> requirements [ $ key ] = $ this -> sanitizeRequirement ( $ key , $ regex ) ; $ this -> compiled = null ; return $ this ; }
Sets a requirement for the given key.

@param string $key   The key
@param string $regex The regex

@return $this
Sets a requirement for the given key .