本文整理汇总了PHP中Events::events方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::events方法的具体用法?PHP Events::events怎么用?PHP Events::events使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::events方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
/**
* Loads the library's dependencies and configuration.
*
* @return void
*/
public static function initialize()
{
// get all installed extensions
if (empty(self::$extensions)) {
self::$CI =& get_instance();
self::$extensions = self::$CI->extension->getInstalledExtensions();
}
// Merge events from indivdual modules.
foreach (Modules::list_modules() as $module) {
// Skip if module is not installed
if (!isset(self::$extensions[$module])) {
continue;
}
$path = ROOTPATH . EXTPATH . "{$module}/config/";
if (is_file($path . 'events.php')) {
$module_events = Modules::load_file('events', $path, 'config');
if (is_array($module_events)) {
self::$events = array_merge_recursive(self::$events, $module_events);
}
}
}
if (self::$events === FALSE) {
self::$events = array();
}
}
示例2: init
public static function init()
{
if (!function_exists('read_config')) {
$ci =& get_instance();
$ci->load->helper('config_file');
}
self::$events = read_config('events');
if (self::$events == false) {
self::$events = array();
}
}
示例3: loadAll
public static function loadAll()
{
if (!isset(self::$events)) {
self::$events = array();
foreach (glob(EVENTS_DIR . '/*.class.php') as $file) {
$class_name = preg_replace('/\\.class\\.php$/', '', basename($file));
self::$events[] = new $class_name();
}
}
return self::$events;
}
示例4: init
/**
* Loads the config/events.php file into memory so we can access it
* later without the disk load.
*
* @access public
*
* @return void
*/
public static function init()
{
if (!function_exists('read_config')) {
$ci =& get_instance();
$ci->load->helper('config_file');
}
self::$events = read_config('events');
// merge other modules events
foreach (module_list(TRUE) as $module) {
if ($module_events = read_config('events', TRUE, $module)) {
self::$events = array_merge_recursive(self::$events, $module_events);
}
}
if (self::$events == false) {
self::$events = array();
}
}
示例5: init
/**
* Loads the library's dependencies and configuration.
*
* @return void
*/
public static function init()
{
if (!function_exists('read_config')) {
self::$ci =& get_instance();
self::$ci->load->helper('config_file');
}
self::$events = read_config('events', true, null, false);
// Merge events from indivdual modules.
foreach (Modules::list_modules(true) as $module) {
$module_events = read_config('events', true, $module, true);
if (is_array($module_events)) {
self::$events = array_merge_recursive(self::$events, $module_events);
}
}
if (self::$events == false) {
self::$events = array();
}
}
示例6: setEvents
private static function setEvents()
{
Events::$events = WynfordChace::getSiteData("events");
return self::$events;
}