src/mako/onion/Onion.php
public function addLayer(string $class, ?array $parameters = null, bool $inner = true): int
	{
		$this->parameters[$class] = $parameters;

		return $inner ? array_unshift($this->layers, $class) : array_push($this->layers, $class);
	}
public function addLayer(string $class, ?array $parameters = null, bool $inner = true): int
	{
		$this->parameters[$class] = $parameters;

		return $inner ? array_unshift($this->layers, $class) : array_push($this->layers, $class);
	}
public function addLayer ( string $ class , ? array $ parameters = null , bool $ inner = true ) : int { $ this -> parameters [ $ class ] = $ parameters ; return $ inner ? array_unshift ( $ this -> layers , $ class ) : array_push ( $ this -> layers , $ class ) ; }
Add a new middleware layer.

@param  string     $class      Class
@param  array|null $parameters Middleware parameters
@param  bool       $inner      Add an inner layer?
@return int
Add a new middleware layer .