public function parse( $template_file )
    {
        if ( file_exists( $template_file ) ) {
            $content = file_get_contents($template_file);

            foreach ( $this->vars as $key => $value ) {
                if ( is_array( $value ) ) {
                    $content = $this->parsePair($key, $value, $content);
                } else {
                    $content = $this->parseSingle($key, (string) $value, $content);
                }
            }

            return $content;
        } else {
            exit( '<h1>Template error</h1>' );
        }
    }
public function parse( $template_file )
    {
        if ( file_exists( $template_file ) ) {
            $content = file_get_contents($template_file);

            foreach ( $this->vars as $key => $value ) {
                if ( is_array( $value ) ) {
                    $content = $this->parsePair($key, $value, $content);
                } else {
                    $content = $this->parseSingle($key, (string) $value, $content);
                }
            }

            return $content;
        } else {
            exit( '<h1>Template error</h1>' );
        }
    }
public function parse ( $ template_file ) { if ( file_exists ( $ template_file ) ) { $ content = file_get_contents ( $ template_file ) ; foreach ( $ this -> vars as $ key => $ value ) { if ( is_array ( $ value ) ) { $ content = $ this -> parsePair ( $ key , $ value , $ content ) ; } else { $ content = $ this -> parseSingle ( $ key , ( string ) $ value , $ content ) ; } } return $ content ; } else { exit ( '<h1>Template error</h1>' ) ; } }
Parse template file
@access public
@param string $template_file
Parse template file