本文整理汇总了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;
}
}
示例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);
示例3: load_components
/**
* load the libraries
*
*/
public static function load_components()
{
add::load_functions('url');
}
示例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');