当前位置: 首页>>代码示例>>PHP>>正文


PHP Lang::current方法代码示例

本文整理汇总了PHP中Lang::current方法的典型用法代码示例。如果您正苦于以下问题:PHP Lang::current方法的具体用法?PHP Lang::current怎么用?PHP Lang::current使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Lang的用法示例。


在下文中一共展示了Lang::current方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: invia_commento

 function invia_commento()
 {
     try {
         $nome = Params::get("nome");
         $subject = Params::get("subject");
         $email = Params::get("email");
         $testo = Params::get("testo");
         //$codice_hidden = Params::get("codice_hidden");
         //$codice = Params::get("codice");
         //if ($codice_hidden!=$codice)
         //    throw new InvalidParameterException("Il codice non e' impostato correttamente!!");
         if ($nome != null && $subject != null && $email != null && $testo != null && isset(Config::instance()->EMAIL_COMMENT_RECEIVED)) {
             $e = new EMail("no_reply@" . Host::current_no_www(), Config::instance()->EMAIL_COMMENT_RECEIVED, "[Nuova commento da : " . $nome . "] - " . Host::current(), EMail::HTML_FORMAT);
             $e->render_and_send("include/messages/mail/alert/" . Lang::current() . "/nuovo_commento.php.inc", array("nome" => $nome, "email" => $email, "subject" => $subject, "testo" => $testo));
             return Redirect::success();
         } else {
             if (!isset(Config::instance()->EMAIL_COMMENT_RECEIVED)) {
                 throw new InvalidDataException("Il parametri di configurazione EMAIL_COMMENT_RECEIVED non e' impostato correttamente!!");
             } else {
                 throw new InvalidDataException("I dati immessi nella form non sono validi!!");
             }
         }
     } catch (Exception $ex) {
         Flash::error($ex->getMessage());
         return Redirect::failure();
     }
 }
开发者ID:mbcraft,项目名称:frozen,代码行数:27,代码来源:CommentiController.class.php

示例2: current

 public static function current($current = null)
 {
     global $root;
     if ($current) {
         self::$current = $current;
     } elseif (isset($_GET['lang']) && file_exists("{$root}/lang/{$_GET['lang']}.php")) {
         self::$current = $_GET['lang'];
     }
     return self::$current;
 }
开发者ID:joksnet,项目名称:php-old,代码行数:10,代码来源:Lang.php

示例3: start

 /**
  * Begins the session.
  */
 public static function start()
 {
     session_start();
     if (isset($_SESSION[self::$name . '_SID'])) {
         self::$sid = $_SESSION[self::$name . '_SID'];
         self::$data = $_SESSION[self::$name . '_DATA'];
     } else {
         self::$sid = md5(time());
         self::$data = array('lang' => Lang::current(), 'uid' => 0);
         $_SESSION[self::$name . '_SID'] = self::$sid;
         $_SESSION[self::$name . '_DATA'] = self::$data;
     }
     Lang::load(self::_('lang'));
     if (self::$data['uid']) {
         self::$logged = true;
     }
 }
开发者ID:joksnet,项目名称:php-old,代码行数:20,代码来源:Session.php

示例4:

<?php

@error_reporting(E_ALL ^ E_NOTICE);
@set_magic_quotes_runtime(0);
if (empty($root)) {
    $root = '.';
}
/**
 * @ignore
 */
$theme = 'default';
require_once "{$root}/includes/String.php";
require_once "{$root}/includes/Lang.php";
require_once "{$root}/includes/Session.php";
require_once "{$root}/includes/Db.php";
Db::connect($configdb);
$config = Db::fetchPairs("SELECT name, value\n     FROM config");
if (isset($config['lang'])) {
    Lang::current($config['lang']);
}
Session::start();
开发者ID:joksnet,项目名称:php-old,代码行数:21,代码来源:common.php

示例5: call

<?php

$success = call("form_submit", "is_comment_successfull");
$lang = Lang::current();
if ($success) {
    include "include/messages/commenti/" . $lang . "/commento_ok.block.php";
} else {
    include "include/messages/commenti/" . $lang . "/errore_commento.block.php";
}
开发者ID:mbcraft,项目名称:frozen,代码行数:9,代码来源:comment_result.block.php

示例6: var_dump

<?php

require_once __DIR__ . '/vendor/autoload.php';
var_dump(Lang::current());
Lang::force('ar');
var_dump(Lang::current());
开发者ID:emados,项目名称:php-statical,代码行数:6,代码来源:index.php


注:本文中的Lang::current方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。