customDispatcher() public static method

Creates a Dispatcher instance from a class name.
public static customDispatcher ( string $className, string $action, array $params ) : Dispatcher
$className string Fully qualified class name.
$action string Action name.
$params array Parameters.
return Dispatcher
Exemplo n.º 1
0
 /**
  * @expectedExceptionMessage The provided callback class
  * @expectedException \Webiny\Component\Bootstrap\BootstrapException
  */
 public function testCustomDispatcherException()
 {
     $class = 'DoesntExist';
     Dispatcher::customDispatcher($class, 'MyActAction', []);
 }
Exemplo n.º 2
0
 /**
  * In case of a custom route, we must use the custom dispatcher.
  *
  * @param string $className Fully qualified callback class name.
  * @param string $action    Class method name.
  * @param array  $params    Parameter list.
  *
  * @return Dispatcher
  */
 private function dispatchCustom($className, $action, $params)
 {
     return Dispatcher::customDispatcher($className, $action, $params);
 }