private function parseTemplate($filename, $data)
    {
        if (is_array($data)) {
            $this->_templateData = $data;
        } else if (is_object($data)) {
            if (method_exists($data, 'getTemplateData')) {
                $this->_templateData = $data->getTemplateData();
            } else {
                $this->_templateData = (array)$data;
            }
        } else {
            $this->_templateData = array('variable' => $data);
        }

        $this->allowRecursion = (!empty($this->_templateData['_allowRecursion']) ? true : false);

        $filename = $this->locateViewFile($filename);

        if ($filename) {
            $this->setCurrentTemplate($filename);

            ob_start();
            include $filename;
            $info = ob_get_contents();
            ob_end_clean();

            return $info;
        }

        return false;
    }
private function parseTemplate($filename, $data)
    {
        if (is_array($data)) {
            $this->_templateData = $data;
        } else if (is_object($data)) {
            if (method_exists($data, 'getTemplateData')) {
                $this->_templateData = $data->getTemplateData();
            } else {
                $this->_templateData = (array)$data;
            }
        } else {
            $this->_templateData = array('variable' => $data);
        }

        $this->allowRecursion = (!empty($this->_templateData['_allowRecursion']) ? true : false);

        $filename = $this->locateViewFile($filename);

        if ($filename) {
            $this->setCurrentTemplate($filename);

            ob_start();
            include $filename;
            $info = ob_get_contents();
            ob_end_clean();

            return $info;
        }

        return false;
    }
private function parseTemplate ( $ filename , $ data ) { if ( is_array ( $ data ) ) { $ this -> _templateData = $ data ; } else if ( is_object ( $ data ) ) { if ( method_exists ( $ data , 'getTemplateData' ) ) { $ this -> _templateData = $ data -> getTemplateData ( ) ; } else { $ this -> _templateData = ( array ) $ data ; } } else { $ this -> _templateData = array ( 'variable' => $ data ) ; } $ this -> allowRecursion = ( ! empty ( $ this -> _templateData [ '_allowRecursion' ] ) ? true : false ) ; $ filename = $ this -> locateViewFile ( $ filename ) ; if ( $ filename ) { $ this -> setCurrentTemplate ( $ filename ) ; ob_start ( ) ; include $ filename ; $ info = ob_get_contents ( ) ; ob_end_clean ( ) ; return $ info ; } return false ; }
Parse a specific filename with data

@param string $filename
@param array $data
@return bool|string
Parse a specific filename with data