コード例 #1
0
ファイル: s_smarty.php プロジェクト: lianren/framework
 static function get_instance()
 {
     if (!(isset(self::$object) && self::$object instanceof Smarty)) {
         self::$object = new Smarty();
     }
     return isset(self::$object) ? self::$object : null;
 }
コード例 #2
0
ファイル: p_function.php プロジェクト: mjiong/framework
 static function media($params, $tpl)
 {
     extract($params);
     $src = isset($src) ? $src : '';
     $width = isset($width) ? $width : 600;
     $height = isset($height) ? $height : 450;
     $autostart = isset($autostart) ? $autostart : 'true';
     $allowfullscreen = isset($allowfullscreen) ? $allowfullscreen : 'true';
     $data = compact('src', 'width', 'height', 'autostart', 'allowfullscreen');
     return s_smarty::show('plugin/media', $data, $tpl);
 }
コード例 #3
0
ファイル: common.php プロジェクト: mjiong/framework
function smarty($group = 'home')
{
    return s_smarty::tpl($group);
}