Router::getParams PHP Метод

getParams() публичный статический Метод

Gets parameter information
public static getParams ( boolean $current = false ) : array
$current boolean Get current request parameter, useful when using requestAction
Результат array Parameter information
    public static function getParams($current = false)
    {
        if ($current && static::$_requests) {
            return static::$_requests[count(static::$_requests) - 1]->params;
        }
        if (isset(static::$_requests[0])) {
            return static::$_requests[0]->params;
        }
        return array();
    }

Usage Example

Пример #1
0
 /**
  * Processes the dispatch
  *
  * @return bool
  */
 private function _process()
 {
     $this->_hasResult = $this->_router->getResult();
     $this->_parameters = $this->_router->getParams();
     if ($this->_parameters !== false) {
         $type = $this->_parameters["type"];
     }
     if ($this->_hasResult === false) {
         $type = "error";
     }
     return $this->_dispatch($type);
 }
All Usage Examples Of Router::getParams