make() public method

Create a new action instance.
public make ( string $class ) : Action
$class string
return Action
Beispiel #1
0
 /**
  * Resolve an action instance by name.
  *
  * @param $name
  * @return \FluxBB\Core\Action
  * @throws \InvalidArgumentException
  */
 protected function resolveAction($name)
 {
     if (isset($this->actions[$name])) {
         return $this->factory->make($this->actions[$name]);
     }
     throw new \InvalidArgumentException("Named action '{$name}' could not be found.");
 }