category Zend
package Zend_Mvc
subpackage Controller

 Methods

Generates a URL based on a route

fromRoute(string $route, array $params, array | bool $options, bool $reuseMatchedParams) : string

Parameters

$route

string

RouteInterface name

$params

array

Parameters to use in url generation, if any

$options

arraybool

RouteInterface-specific options to use in url generation, if any. If boolean, and no fourth argument, used as $reuseMatchedParams

$reuseMatchedParams

bool

Whether to reuse matched parameters

Exceptions

\Zend\Mvc\Exception\DomainException if composed controller does not implement InjectApplicationEventInterface, or router cannot be found in controller event
\Zend\Mvc\Exception\RuntimeException if no RouteMatch instance or no matched route name present

Returns

string

Get the current controller instance

getController() : null | \Zend\Stdlib\DispatchableInterface
Inherited

inherited_from \Zend\Mvc\Controller\Plugin\AbstractPlugin::getController()

Returns

Set the current controller instance

setController(\Zend\Stdlib\DispatchableInterface $controller) : void
Inherited

inherited_from \Zend\Mvc\Controller\Plugin\AbstractPlugin::setController()

Parameters

 Properties

 

$controller

$controller : null | \Zend\Stdlib\DispatchableInterface
Inherited

inherited_from \Zend\Mvc\Controller\Plugin\AbstractPlugin::$$controller