src/mako/commander/CommandBus.php
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;
	}
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;
	}
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 ; }
Resolves the onion instance.

@param  array             $middleware Middleware
@return \mako\onion\Onion
Resolves the onion instance .