本文整理汇总了PHP中Templates::evalSmartyString方法的典型用法代码示例。如果您正苦于以下问题:PHP Templates::evalSmartyString方法的具体用法?PHP Templates::evalSmartyString怎么用?PHP Templates::evalSmartyString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Templates
的用法示例。
在下文中一共展示了Templates::evalSmartyString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testDbSettings
/**
* Checks to see if the database information provided is valid or not.
* @access public
*/
public static function testDbSettings($dbHostname, $dbName, $dbUsername, $dbPassword)
{
$dbConnectionError = "";
$lang = Core::$language->getCurrentLanguageStrings();
$link = @mysqli_connect($dbHostname, $dbUsername, $dbPassword, $dbName);
if (mysqli_connect_errno($link)) {
$dbConnectionError = mysqli_connect_error();
}
if ($dbConnectionError) {
$placeholders = array("db_connection_error" => $dbConnectionError);
$error = Templates::evalSmartyString($lang["install_invalid_db_info"], $placeholders);
return array(false, $error);
} else {
@mysqli_close($link);
}
return array(true, "");
}
示例2: genFormatCustom
/**
* Generates the data in whatever Smarty content the user entered.
* @param array $data
* @param string $template
*/
private function genFormatCustom($data, $template)
{
return Templates::evalSmartyString($template, $data);
}
示例3: generateCustomXML
/**
* This is used to generate custom XML formats.
*
* @param object $generator the Generator object
* @param string $smartyTemplate the Smarty content
* @return string
*/
private function generateCustomXML($generator, $smartyTemplate)
{
$data = $generator->generateExportData();
return Templates::evalSmartyString($smartyTemplate, $data);
}