本文整理匯總了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);
}