本文整理汇总了PHP中Templates::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Templates::get方法的具体用法?PHP Templates::get怎么用?PHP Templates::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Templates
的用法示例。
在下文中一共展示了Templates::get方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ruleExists
public function ruleExists($name)
{
try {
Templates::get($name);
return true;
} catch (\Exception $e) {
return false;
}
}
示例2: Messages
}
$ADK_MESSAGES = new Messages();
$ADK_MESSAGES->userid = $ADK_USER_ID;
$ADK_MESSAGES->foldername = 'Inbox';
$ADK_MESSAGES->get($con);
switch ($ADK_USERGROUP_CDE) {
case 'ADM':
require_once 'includes/classes/Template.php';
$ADK_MSG_TMPLS = new Templates();
$ADK_MSG_TMPLS->get($con, $_SESSION['ADK_USER_ID']);
$ADK_HIKERS = new Hikers();
$ADK_HIKERS->get($con, $ADK_USER_ID);
break;
case 'COR':
require_once 'includes/classes/Template.php';
$ADK_MSG_TMPLS = new Templates();
$ADK_MSG_TMPLS->get($con, $_SESSION['ADK_USER_ID']);
$ADK_HIKERS = new Hikers();
$ADK_HIKERS->get($con, $ADK_USER_ID);
break;
case 'HIK':
require_once 'includes/classes/Correspondent.php';
$ADK_HIKER = new Hiker();
$ADK_HIKER->id = $ADK_USER_ID;
$ADK_HIKER->get($con);
$ADK_CORRESPONDENT = new Correspondent();
$ADK_CORRESPONDENT->id = $ADK_HIKER->corrid;
$ADK_CORRESPONDENT->get($con);
break;
}
$con->close();
示例3: toCode
public function toCode($input, $parent = NULL)
{
$self = $this;
$args = (array) $this->args;
$type = $this->type;
$scalar = $this->testScalar;
$this->msg = str_replace('$value', $input, $this->msg);
$code = "\n/* {$this->type} {{{ */\n";
$code .= Templates::get('rule')->render(compact('self', 'input', 'args', 'parent', 'type', 'scalar'), true);
$code .= Templates::get('error')->render(compact('self', 'parent'), true);
$code .= "/* }}} */\n";
return $code;
}