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


PHP registry::add_class方法代碼示例

本文整理匯總了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());
 }
開發者ID:ZerGabriel,項目名稱:plugin-awards,代碼行數:34,代碼來源:awards_plugin_class.php

示例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);
 }
開發者ID:ZerGabriel,項目名稱:wow_assasinen,代碼行數:10,代碼來源:wow_assasinen.class.php


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