ice framework documentation ice doc v1.10.1
Class Ice

Dispatcher

Methods
Methods Details
  • public function getDefaultNamespace()

  • public function setDefaultNamespace(variable $defaultNamespace)

  • public function getActiveHandler()

  • public function getLastHandler()

  • public function getLoops()

  • public function setLoops(variable $loops)

  • public function getFinished()

  • public function getForwards()

  • public function getForwarded()

  • public function setSilent(variable $silent)

  • public function getModules()

  • public function setModules(variable $modules)

  • public function getModule()

  • public function setModule(variable $module)

  • public function getNamespace()

  • public function setNamespace(variable $namespace)

  • public function getHandler()

  • public function setHandler(variable $handler)

  • public function getAction()

  • public function setAction(variable $action)

  • public function getParams()

  • public function setParams(variable $params)

  • public function getReturnedValue()

  • public function setReturnedValue(variable $returnedValue)

  • public function getHandlers()

  • public function setHandlers(variable $handlers)

  • public function getHandlerSuffix()

  • public function setHandlerSuffix(variable $handlerSuffix)

  • public function getActionSuffix()

  • public function setActionSuffix(variable $actionSuffix)

  • public function __construct()

    Di constructor. Fetch Di and set it as a property.
  • public function hasParam(string $key)

    Whether or not an param exists by key.
  • public function setParam(variable $param, variable $value)

    Set a param by its name or numeric index.
  • public function getParam(string $key, variable $filters, variable $defaultValue, bool $allowEmpty)

    Gets variable from params attribute applying filters if needed.
    If no parameters are given, return all.
    
          //Returns value from $params["id"] without sanitizing
          $id = $this->router->getParam("id");
         
          //Returns value from $params["title"] with sanitizing
          $title = $this->router->getParam("title", "escape|repeats");
         
          //Returns value from $params["id"] with a default value
          $id = $this->router->getParam("id", null, 150);
         
  • public function getActiveMethod()

    Returns the current method to be/executed in the dispatcher.
  • public function addModule(string $name, array $options)

    Add module with its dir path, initial class name and namespace
  • public function dispatch()

    Dispatches a handle action taking into account the routing parameters.
  • public function forward(array $forward, bool $force)

    Forwards the execution flow to another module/controller/action.
  • public function reset()

    Reset module, handler and action to default ones, and empty the params.
  • internal function zephir_init_properties_Ice_Dispatcher()