public function getParams(RequestItem $request) { $param_map = array_flip($this->parameters); $regex = $this->expression; $matches = preg_split($regex, $request->uri(), null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY); $params = []; foreach ($param_map as $key => $value) { $params[$key] = array_shift($matches); } return $params; }
public function chunks() { static::createInstance(); return static::$current->uri(); }