Beispiel #1
0
 /**
  * Inclusion d'une classe.
  *
  * @param string $class
  */
 public static function includeClass($class)
 {
     $classPath = strtr($class, '_', '/') . '.php';
     Afup::includeOnce($classPath);
 }
Beispiel #2
0
<?php

Afup::includeOnce('smarty/Smarty.class.php');
/**
 * Moteur de template de l'annuaire, basé sur smarty. 
 *
 * @todo baser le moteur sur Zend_View : plus souple, moins gourmand
 * @author Guillaume Ponçon <*****@*****.**>
 * @version 1.0
 * @copyright 2006 Association Française des Utilisateurs de PHP
 * @since 1.0 - Thu Jul 13 14:32:32 CEST 2006
 * @package afup
 * @subpackage directory
 */
class Afup_Directory_Template extends Smarty
{
    /**
     * Configuration de smarty, chargement d'une instance du moteur. 
     *
     * @todo caching conditionnel
     * @return Afup_Directory_Template
     */
    public function Afup_Directory_Template()
    {
        $this->Smarty();
        $this->template_dir = Afup::getLibraryPath() . '/../templates/directory/';
        $this->compile_dir = Afup::getLibraryPath() . '/../cache/templates/directory/';
        $this->config_dir = Afup::getLibraryPath() . '/';
        $this->cache_dir = Afup::getLibraryPath() . '/../cache/templates/directory/cache/';
        $this->caching = false;
    }