public function renderSections($template, array $data = [], $class = null)
    {
        $outputs = new \stdClass();
        $setter = function ($name, $content) use ($outputs) {
            $outputs->$name = $content;
        };
        $this->events->on('f.sections.content', $setter);
        $this->render($template, $data, $class);
        $this->events->removeListener('f.sections.content', $setter);

        return get_object_vars($outputs);
    }
public function renderSections($template, array $data = [], $class = null)
    {
        $outputs = new \stdClass();
        $setter = function ($name, $content) use ($outputs) {
            $outputs->$name = $content;
        };
        $this->events->on('f.sections.content', $setter);
        $this->render($template, $data, $class);
        $this->events->removeListener('f.sections.content', $setter);

        return get_object_vars($outputs);
    }
public function renderSections ( $ template , array $ data = [ ] , $ class = null ) { $ outputs = new \ stdClass ( ) ; $ setter = function ( $ name , $ content ) use ( $ outputs ) { $ outputs -> $ name = $ content ; } ; $ this -> events -> on ( 'f.sections.content' , $ setter ) ; $ this -> render ( $ template , $ data , $ class ) ; $ this -> events -> removeListener ( 'f.sections.content' , $ setter ) ; return get_object_vars ( $ outputs ) ; }
Render a template and return an array where the keys are template section names and values
the section rendered content.

@param  string $template
@param  array  $data
@param  null   $class
@return array
Render a template and return an array where the keys are template section names and values the section rendered content .