Pubwich::renderTemplate PHP 메소드

renderTemplate() 공개 정적인 메소드

Renders the template according to the current theme
public static renderTemplate ( ) : void
리턴 void
    public static function renderTemplate()
    {
        if (!file_exists(self::getThemePath() . "/index.tpl.php")) {
            throw new PubwichError(sprintf(Pubwich::_('The file <code>%s</code> was not found. It has to be there.'), '/themes/' . PUBWICH_THEME . '/index.tpl.php'));
        }
        foreach (self::$classes as &$classe) {
            $classe->init();
        }
        if (file_exists(self::getThemePath() . "/functions.php")) {
            require self::getThemePath() . "/functions.php";
            self::applyTheme();
        }
        include self::getThemePath() . '/index.tpl.php';
    }

Usage Example

예제 #1
0
파일: index.php 프로젝트: j15e/pubwich
<?php

// $Id$
define('PUBWICH', 1);
require dirname(__FILE__) . '/lib/Pubwich.php';
Pubwich::init();
Pubwich::renderTemplate();