src/Onion.php
private function createLayer($nextLayer, $layer)
    {
        return function($object) use($nextLayer, $layer){
            return $layer->peel($object, $nextLayer);
        };
    }
private function createLayer($nextLayer, $layer)
    {
        return function($object) use($nextLayer, $layer){
            return $layer->peel($object, $nextLayer);
        };
    }
private function createLayer ( $ nextLayer , $ layer ) { return function ( $ object ) use ( $ nextLayer , $ layer ) { return $ layer -> peel ( $ object , $ nextLayer ) ; } ; }
Get an onion layer function.
This function will get the object from a previous layer and pass it inwards
@param  LayerInterface $nextLayer
@param  LayerInterface $layer
@return Closure
Get an onion layer function . This function will get the object from a previous layer and pass it inwards