/** * Uses the container to resolve arguments * * @param array $args * * @return array */ function resolveArguments(array $args) { $resolved = []; foreach ($args as $arg) { $resolved[] = is_string($arg) && ($this->di->has($arg) || $this->di->isSingleton($arg) || class_exists($arg)) ? $this->di->get($arg) : $arg; } return $resolved; }
/** * Middleware constructor. */ public function __construct() { parent::__construct(); $this->forge = Forge::getInstance(); $this->events = $this->forge->make(Events::class); }