public function extractParameters(array $conditions)
    {
        preg_match_all('/{(\w+)}/', $this->regrex, $matches, PREG_PATTERN_ORDER);

        array_map(function ($parameter) use ($conditions) {
            if (isset($conditions[$parameter])) {
                return $this->parameters[$parameter] = $conditions[$parameter];
            }

            return $this->parameters[$parameter] = self::DEFAULT_REGREX;
        }, $matches[1]);

        return $this;
    }
public function extractParameters(array $conditions)
    {
        preg_match_all('/{(\w+)}/', $this->regrex, $matches, PREG_PATTERN_ORDER);

        array_map(function ($parameter) use ($conditions) {
            if (isset($conditions[$parameter])) {
                return $this->parameters[$parameter] = $conditions[$parameter];
            }

            return $this->parameters[$parameter] = self::DEFAULT_REGREX;
        }, $matches[1]);

        return $this;
    }
public function extractParameters ( array $ conditions ) { preg_match_all ( '/{(\w+)}/' , $ this -> regrex , $ matches , PREG_PATTERN_ORDER ) ; array_map ( function ( $ parameter ) use ( $ conditions ) { if ( isset ( $ conditions [ $ parameter ] ) ) { return $ this -> parameters [ $ parameter ] = $ conditions [ $ parameter ] ; } return $ this -> parameters [ $ parameter ] = self :: DEFAULT_REGREX ; } , $ matches [ 1 ] ) ; return $ this ; }
Extracts parameters from rule pattern and conditions.

@param  string $pattern
@param  array $conditions

@return self
Extracts parameters from rule pattern and conditions .