protected function resolveOnion(array $middleware): Onion
	{
		if(empty($middleware))
		{
			return $this->onion;
		}

		$onion = clone $this->onion;

		foreach($middleware as $layer)
		{
			$onion->addLayer($layer);
		}

		return $onion;
	}