Ejemplo n.º 1
0
 public function run(ModuleContainer $container = null)
 {
     $this->executed = true;
     if (!$container) {
         return null;
     }
     $activeModule = $container->moduleForAction($this->action);
     if (!is_callable([$activeModule, $this->action])) {
         throw new \RuntimeException("Action '{$this->action}' can't be called");
     }
     try {
         $res = call_user_func_array([$activeModule, $this->action], $this->arguments);
     } catch (\Exception $e) {
         $this->failed = true;
         throw $e;
     }
     return $res;
 }