src/mako/onion/Onion.php
public function peel(object $object, array $parameters = [], array $middlewareParameters = [])
	{
		$next = $this->buildCoreClosure($object);

		foreach($this->layers as $layer)
		{
			$middleware = $this->middlewareFactory($layer, $middlewareParameters);

			$next = $this->buildLayerClosure($middleware, $next);
		}

		return $next(...$parameters);
	}
public function peel(object $object, array $parameters = [], array $middlewareParameters = [])
	{
		$next = $this->buildCoreClosure($object);

		foreach($this->layers as $layer)
		{
			$middleware = $this->middlewareFactory($layer, $middlewareParameters);

			$next = $this->buildLayerClosure($middleware, $next);
		}

		return $next(...$parameters);
	}
public function peel ( object $ object , array $ parameters = [ ] , array $ middlewareParameters = [ ] ) { $ next = $ this -> buildCoreClosure ( $ object ) ; foreach ( $ this -> layers as $ layer ) { $ middleware = $ this -> middlewareFactory ( $ layer , $ middlewareParameters ) ; $ next = $ this -> buildLayerClosure ( $ middleware , $ next ) ; } return $ next ( ... $ parameters ) ; }
Executes the middleware stack.

@param  object $object               The object that we're decorating
@param  array  $parameters           Parameters
@param  array  $middlewareParameters Middleware parameters
@return mixed
Executes the middleware stack .