public function get($name, $template = '', $vars = array(), $globalScriptVars = '') {
        if ($template !== '') {
            $this->setTemplate($template);
        }
        //Creation the full path of the view
        $path = $this->viewsFolder . '/html/' . $name;
        //If exists vars to assign, we assing one by one.
        $viewVars = (count($vars) > 0) ? $vars : $this->viewVars;

        //Include the style if exists some style to include
        if (isset($this->styles)) {
            $vars['styles'] = $this->styles;
        }

        //Finalmente, incluimos la plantilla con las variables de los scripts.
        $this->contentView = $this->getFileContent($path, $viewVars) . $globalScriptVars;
        return $this;
    }
public function get($name, $template = '', $vars = array(), $globalScriptVars = '') {
        if ($template !== '') {
            $this->setTemplate($template);
        }
        //Creation the full path of the view
        $path = $this->viewsFolder . '/html/' . $name;
        //If exists vars to assign, we assing one by one.
        $viewVars = (count($vars) > 0) ? $vars : $this->viewVars;

        //Include the style if exists some style to include
        if (isset($this->styles)) {
            $vars['styles'] = $this->styles;
        }

        //Finalmente, incluimos la plantilla con las variables de los scripts.
        $this->contentView = $this->getFileContent($path, $viewVars) . $globalScriptVars;
        return $this;
    }
public function get ( $ name , $ template = '' , $ vars = array ( ) , $ globalScriptVars = '' ) { if ( $ template !== '' ) { $ this -> setTemplate ( $ template ) ; } //Creation the full path of the view $ path = $ this -> viewsFolder . '/html/' . $ name ; //If exists vars to assign, we assing one by one. $ viewVars = ( count ( $ vars ) > 0 ) ? $ vars : $ this -> viewVars ; //Include the style if exists some style to include if ( isset ( $ this -> styles ) ) { $ vars [ 'styles' ] = $ this -> styles ; } //Finalmente, incluimos la plantilla con las variables de los scripts. $ this -> contentView = $ this -> getFileContent ( $ path , $ viewVars ) . $ globalScriptVars ; return $ this ; }
Get the view render as string.

@param string $name path name to the view.
@param string $template name of the template used for this view in case
to be the last one to be output.
@param mixed $vars vars to include into the view.
@param mixed $globalScriptVars global scripts included in the view.
@return BasicViewInterface
Get the view render as string .