private function buildRenderer($render = 'foil', array $renderingInfo = []) {
      switch($render) {
        case "raw":
          $renderer = new RawRenderer();
          $renderInfo = [];
          break;
        
        case "json":
          $renderer = new JsonRenderer();
          $renderInfo = [];
          break;
        
        case "foil":
        default:
          $renderer = new FoilRenderer();
          $renderInfo['options'] = $renderingInfo['engines']['foil']['options'];
          $renderInfo['folders'] = $renderingInfo['engines']['foil']['folders'];
          break;
      }

      //Setup renderer
      $renderer->setup($renderInfo);
      
      return $renderer;
    }
private function buildRenderer($render = 'foil', array $renderingInfo = []) {
      switch($render) {
        case "raw":
          $renderer = new RawRenderer();
          $renderInfo = [];
          break;
        
        case "json":
          $renderer = new JsonRenderer();
          $renderInfo = [];
          break;
        
        case "foil":
        default:
          $renderer = new FoilRenderer();
          $renderInfo['options'] = $renderingInfo['engines']['foil']['options'];
          $renderInfo['folders'] = $renderingInfo['engines']['foil']['folders'];
          break;
      }

      //Setup renderer
      $renderer->setup($renderInfo);
      
      return $renderer;
    }
private function buildRenderer ( $ render = 'foil' , array $ renderingInfo = [ ] ) { switch ( $ render ) { case "raw" : $ renderer = new RawRenderer ( ) ; $ renderInfo = [ ] ; break ; case "json" : $ renderer = new JsonRenderer ( ) ; $ renderInfo = [ ] ; break ; case "foil" : default : $ renderer = new FoilRenderer ( ) ; $ renderInfo [ 'options' ] = $ renderingInfo [ 'engines' ] [ 'foil' ] [ 'options' ] ; $ renderInfo [ 'folders' ] = $ renderingInfo [ 'engines' ] [ 'foil' ] [ 'folders' ] ; break ; } //Setup renderer $ renderer -> setup ( $ renderInfo ) ; return $ renderer ; }
Build, setup and return renderer

@param string $render
@param array $renderingInfo
@return \Nuki\Skeletons\Handlers\Renderer
Build setup and return renderer