本文整理汇总了PHP中registry::add_class方法的典型用法代码示例。如果您正苦于以下问题:PHP registry::add_class方法的具体用法?PHP registry::add_class怎么用?PHP registry::add_class使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类registry
的用法示例。
在下文中一共展示了registry::add_class方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor
* Initialize all informations for installing/uninstalling plugin
*/
public function __construct()
{
parent::__construct();
$this->add_data(array('name' => 'Awards', 'code' => 'awards', 'path' => 'awards', 'contact' => 'support@assasinen.5cz.de', 'template_path' => 'plugins/awards/templates/', 'icon' => 'fa fa-list-alt', 'version' => $this->version, 'author' => $this->copyright, 'description' => $this->user->lang('awards_short_desc'), 'long_description' => $this->user->lang('awards_long_desc'), 'homepage' => 'https://eqdkp-plus.eu/', 'manuallink' => 'https://eqdkp-plus.eu/wiki/Plugin:_Awards', 'plus_version' => '2.0', 'build' => $this->build));
$this->add_dependency(array('plus_version' => '2.0'));
// -- Register our permissions ------------------------
// permissions: 'a'=admins, 'u'=user
// ('a'/'u', Permission-Name, Enable? 'Y'/'N', Language string, array of user-group-ids that should have this permission)
// Groups: 1 = Guests, 2 = Super-Admin, 3 = Admin, 4 = Member
$this->add_permission('u', 'view', 'Y', $this->user->lang('view'), array(2, 3, 4));
$this->add_permission('a', 'add', 'N', $this->user->lang('add'), array(2, 3));
$this->add_permission('a', 'manage', 'N', $this->user->lang('manage'), array(2, 3));
// -- PDH Modules -------------------------------------
$this->add_pdh_read_module('awards_achievements');
$this->add_pdh_read_module('awards_assignments');
$this->add_pdh_read_module('awards_library');
$this->add_pdh_write_module('awards_achievements');
$this->add_pdh_write_module('awards_assignments');
// -- Classes -----------------------------------------
registry::add_class('awards_plugin', 'plugins/awards/classes/', 'awards');
// -- Routing -----------------------------------------
$this->routing->addRoute('Awards', 'awards', 'plugins/awards/pageobjects');
// -- Hooks -------------------------------------------
$this->add_hook('portal', 'awards_portal_hook', 'portal');
$this->add_hook('userprofile_customtabs', 'awards_userprofile_customtabs_hook', 'userprofile_customtabs');
// -- Menu --------------------------------------------
$this->add_menu('admin', $this->gen_admin_menu());
$this->add_menu('main', $this->gen_main_menu());
$this->add_menu('settings', $this->usersettings());
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->pdh->register_read_module($this->this_game, $this->path . 'pdh/read/' . $this->this_game);
// Meine Klasse und mein benötigtes PDH Modul
registry::add_class('wow_arsenal', $this->path . 'arsenal/', 'arsenal');
$this->pdh->register_read_module('arsenal_character', $this->path . 'pdh/read/arsenal_character');
$this->pdh->register_write_module('arsenal_character', $this->path . 'pdh/write/arsenal_character');
$this->importers = array('char_import' => 'charimporter.php', 'char_update' => 'charimporter.php', 'guild_import' => 'guildimporter.php', 'guild_imp_rsn' => false, 'import_data_cache' => false);
}