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