当前位置: 首页>>代码示例>>PHP>>正文


PHP Haanga::load方法代码示例

本文整理汇总了PHP中Haanga::load方法的典型用法代码示例。如果您正苦于以下问题:PHP Haanga::load方法的具体用法?PHP Haanga::load怎么用?PHP Haanga::load使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Haanga的用法示例。


在下文中一共展示了Haanga::load方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: do_league_tabs

function do_league_tabs()
{
    global $globals;
    $globals['league_base_url'] = $globals['base_url'] . 'admin/league/';
    $tabs = array(_('Ligas') => 'index.php', _('Equipos') => 'teams.php', _('Partidos') => 'matches.php');
    $links = array();
    $self = basename($_SERVER["SCRIPT_NAME"]);
    foreach ($tabs as $tab => $page) {
        $links[] = array('url' => $globals['league_base_url'] . $page, 'name' => $tab, 'active' => $page == $self);
    }
    Haanga::load('league/list.tpl', compact('links'));
}
开发者ID:GallardoAlba,项目名称:Meneame,代码行数:12,代码来源:common.php

示例2: render

 /**
  * Render Haanga Template
  *
  * This method will output the rendered template content
  *
  * @param   string $template The path to the Haanga template, relative to the Haanga templates directory.
  * @return  string|NULL
  */
 public function render($template)
 {
     return Haanga::load($template, $this->data);
 }
开发者ID:rubberneck,项目名称:slim-extras,代码行数:12,代码来源:Haanga.php

示例3: array

<?php

require "../lib/Haanga.php";
#apd_set_pprof_trace('/tmp/apd/');
$config = array('cache_dir' => 'tmp/', 'template_dir' => 'complex/');
if (is_callable('xcache_isset')) {
    /* don't check for changes in the template for the next 5 min */
    $config['check_ttl'] = 300;
    $config['check_get'] = 'xcache_get';
    $config['check_set'] = 'xcache_set';
}
Haanga::Configure($config);
$people = array(array('first_name' => 'George </br>', 'last_name' => 'Bush', 'gender' => 'Male', 'foobar' => 'extra'), array('first_name' => 'Bill', 'last_name' => 'Clinton', 'gender' => 'Male'), array('first_name' => 'Margaret', 'last_name' => 'Thatcher', 'gender' => 'Female'), array('first_name' => 'Condoleezza', 'last_name' => 'Rice', 'gender' => 'Female'), array('first_name' => 'Pat', 'last_name' => 'Smith', 'gender' => 'Unknown', 'bar' => 'foo'), array('first_name' => '"Cesar', 'last_name' => 'Rodas"', 'gender' => 'Male'));
$vars = array('some_list' => array(1, 2, 3, 4, 4, 4, 5), 'user' => 'crodas', 'base_template' => 'subtemplate.html', 'people' => $people, 'days' => array(strtotime("01/27/2010"), strtotime("01/28/2010"), strtotime("02/22/2010"), strtotime("02/28/2010"), strtotime("08/25/2010"), strtotime("08/30/2010")), 'templates' => array('base' => 'index-test.html'));
$time = microtime(TRUE);
$mem = memory_get_usage();
Haanga::load('index.html', $vars);
var_dump(array('memory' => (memory_get_usage() - $mem) / (1024 * 1024), 'seconds' => microtime(TRUE) - $time));
开发者ID:crodas,项目名称:haanga,代码行数:18,代码来源:index.php


注:本文中的Haanga::load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。