middleware)) { $this->middleware = [$this->middleware]; } $array = []; foreach ($this->middleware as $key => $value) { $sn = Snowflake::createObject($value); if (!($sn instanceof IMiddleware)) { continue; } $array[] = [$sn, 'onHandler']; } $this->middleware = $array; } /** * @param array $handler * @return Middleware */ public function execute(mixed $class, mixed $method = null): static { return $this; } }