本文整理汇总了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();
}