當前位置: 首頁>>代碼示例>>PHP>>正文


PHP add::load_functions方法代碼示例

本文整理匯總了PHP中add::load_functions方法的典型用法代碼示例。如果您正苦於以下問題:PHP add::load_functions方法的具體用法?PHP add::load_functions怎麽用?PHP add::load_functions使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在add的用法示例。


在下文中一共展示了add::load_functions方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: current_user_allowed

 public static function current_user_allowed()
 {
     add::load_functions('network');
     if (current_ip_in_network()) {
         return true;
     } else {
         return false;
     }
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:9,代碼來源:debug.class.php

示例2: array_merge

    $C->incs_dir = $C->root_dir . '/includes';
}
# Merge config declared class directories
$C->classes_dirs = array_merge(array($C->incs_dir . '/classes'), isset($C->classes_dirs) ? is_array($C->classes_dirs) ? $C->classes_dirs : (array) $C->classes_dirs : array(), array($C->add_dir . '/classes'));
# Set these rarely used directory variables
if (!isset($C->configs_dir)) {
    $C->configs_dir = $C->incs_dir . '/configs';
}
if (!isset($C->views_dir)) {
    $C->views_dir = $C->incs_dir . '/views';
}
if (!isset($C->caches_dir)) {
    $C->caches_dir = $C->incs_dir . '/caches';
}
# Load the common functions
add::load_functions('common');
# Just initialize the variables according to the environment status
add::environment_status(true);
/**
 * Set the exception emails
 *
 * @see http://code.google.com/p/add-mvc-framework/issues/detail?id=38
 *
 *
 */
if (isset($C->developer_emails)) {
    if (is_string($C->developer_emails)) {
        e_add::$email_addresses = $C->developer_emails;
    } else {
        if (is_object($C->developer_emails) || is_array($C->developer_emails)) {
            e_add::$email_addresses = implode(", ", (array) $C->developer_emails);
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:31,代碼來源:init.php

示例3: load_components

 /**
  * load the libraries
  *
  */
 public static function load_components()
 {
     add::load_functions('url');
 }
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:8,代碼來源:add_current_user.class.php

示例4: redirect_query

}
/**
 * void redirect_query(array $new_query,bool $merge_current=true)
 * redirects to the new query string, die()s in the process
 * @param array $new_query
 * @param boolean $merge_current true to include current $_GET with $new_query
 * @todo support string on $new_query
 * @uses redirect()
 *
 * @deprecated see add::redirect_query()
 */
function redirect_query($new_query, $merge_current = true)
{
    trigger_error("Deprecated redirect_query function", E_USER_DEPRECATED);
    add::redirect_query($new_query, $merge_current);
}
/**
 * salt_string($string,$salt = DEFAULT_SALT)
 * Salt a string $salt
 * @param string $string the string to salt
 * @param string $salt the secret salt
 */
function salt_string($string, $salt = DEFAULT_SALT)
{
    if (!defined('DEFAULT_SALT')) {
        throw new Exception("DEFAULT_SALT is not defined");
    }
    return sha1($string . $salt);
}
add::load_functions('network');
開發者ID:google-code-backups,項目名稱:add-mvc-framework,代碼行數:30,代碼來源:common.functions.php


注:本文中的add::load_functions方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。