本文整理匯總了PHP中FORM::translate方法的典型用法代碼示例。如果您正苦於以下問題:PHP FORM::translate方法的具體用法?PHP FORM::translate怎麽用?PHP FORM::translate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類FORM
的用法示例。
在下文中一共展示了FORM::translate方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: apply
public static function apply()
{
Output\OUTPUT::set_static_file();
if (self::has_attribute(self::get("primary_database")[0], "alias", true)) {
CONFIG::$primarydatabase = self::get("primary_database")[0]["@attributes"]["alias"];
}
foreach (self::get("rewrite_rules") as $value) {
REQUEST::translate($value);
}
foreach (self::get("links") as $value) {
self::set_table_links($value);
}
if (REQUEST::$is_static == true && !empty(Output\OUTPUT::$static_file)) {
Output\OUTPUT::static_file();
}
if (REQUEST::redirect()) {
header("Location: " . REQUEST::root() . "/" . REQUEST::redirect_uri());
}
foreach (self::get("accounttypes") as $value) {
ACCOUNT::translate($value);
}
foreach (self::get("database") as $value) {
if (self::has_attribute($value, "alias", true)) {
$alias = $value["@attributes"]["alias"];
unset($value["@attributes"]["alias"]);
$config = $value["@attributes"];
unset($value["@attributes"]);
if (!isset($config["tablelinks"]) && isset(self::$table_links[$alias])) {
$config["tablelinks"] = self::$table_links[$alias];
}
Database\DATABASE::register_database($alias, $config);
foreach (self::get("table") as $subvalue) {
if (!self::find_previous_config("table:", $subvalue) && !empty($subvalue)) {
if (isset($value["@attributes"]["database_alias"]) && $value["@attributes"]["database_alias"] == $alias) {
self::configure_database($subvalue);
}
}
}
}
}
foreach (self::get("form") as $value) {
if (self::has_attribute($value, "name", true)) {
FORM::translate($value["@attributes"]["name"], $value);
}
}
foreach (self::get("project") as $value) {
foreach ($value as $subkey => $subvalue) {
if (self::startswith(strtolower($subkey), "include:") && self::has_attribute($subvalue, "file", true)) {
$file = $subvalue["@attributes"]["file"];
if (file_exists(self::$projectdir . "/" . $file . ".php")) {
include self::$projectdir . "/" . $file . ".php";
}
}
}
}
ACCOUNT::set_database_config();
REQUEST::init();
ACCOUNT::access();
if (ACCOUNT::redirect()) {
header("Location: " . REQUEST::root() . "/" . REQUEST::redirect_uri());
}
REQUEST::access();
}