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


PHP rcube::get_instance方法代碼示例

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


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

示例1: init

 function init()
 {
     $this->add_texts('localization/');
     $this->register_action('plugin.archive', array($this, 'request_action'));
     $rcmail = rcube::get_instance();
     if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show') && ($archive_folder = $rcmail->config->get('archive_mbox'))) {
         $this->add_hook('render_mailboxlist', array($this, 'render_mailboxlist'));
         if ($rcmail->config->get('archive_show_button', true)) {
             $this->add_button(array('type' => 'link', 'label' => 'buttontitle', 'command' => 'plugin.archive', 'class' => 'button buttonPas archive disabled', 'classact' => 'button archive', 'width' => 32, 'height' => 32, 'title' => 'buttontitle', 'domain' => $this->ID), 'toolbar');
         }
         $rcmail->output->set_env('archive_folder', $archive_folder);
         if ($rcmail->config->get('skin', 'larry') == 'classic') {
             $this->include_stylesheet('skins/classic/archivefolder.css');
         }
     } else {
         if ($rcmail->task == 'settings') {
             $dont_override = $rcmail->config->get('dont_override', array());
             if (!in_array('archive_mbox', $dont_override)) {
                 $this->add_hook('preferences_sections_list', array($this, 'archivefoldersection'));
                 $this->add_hook('preferences_list', array($this, 'prefs_table'));
                 $this->add_hook('preferences_save', array($this, 'save_prefs'));
             }
         }
     }
 }
開發者ID:MetallianFR68,項目名稱:myroundcube,代碼行數:25,代碼來源:archivefolder.php

示例2: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new help($rcube->api);
     $this->assertInstanceOf('help', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:BIGGANI,項目名稱:zpanelx,代碼行數:10,代碼來源:Help.php

示例3: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new database_attachments($rcube->api);
     $this->assertInstanceOf('database_attachments', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:BIGGANI,項目名稱:zpanelx,代碼行數:10,代碼來源:DatabaseAttachments.php

示例4: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new identity_select($rcube->api);
     $this->assertInstanceOf('identity_select', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:rcg2015,項目名稱:roundcubemail,代碼行數:10,代碼來源:IdentitySelect.php

示例5: __construct

 /**
  * Constructor
  *
  * @param string $lang Language code
  */
 function __construct($lang = 'en')
 {
     $this->rc = rcube::get_instance();
     $this->engine = $this->rc->config->get('spellcheck_engine', 'googie');
     $this->lang = $lang ? $lang : 'en';
     $this->options = array('ignore_syms' => $this->rc->config->get('spellcheck_ignore_syms'), 'ignore_nums' => $this->rc->config->get('spellcheck_ignore_nums'), 'ignore_caps' => $this->rc->config->get('spellcheck_ignore_caps'), 'dictionary' => $this->rc->config->get('spellcheck_dictionary'));
 }
開發者ID:CDN-Sparks,項目名稱:owncloud,代碼行數:12,代碼來源:rcube_spellchecker.php

示例6: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new additional_message_headers($rcube->api);
     $this->assertInstanceOf('additional_message_headers', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:BIGGANI,項目名稱:zpanelx,代碼行數:10,代碼來源:AdditionalMessageHeaders.php

示例7: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new new_user_dialog($rcube->api);
     $this->assertInstanceOf('new_user_dialog', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:rcg2015,項目名稱:roundcubemail,代碼行數:10,代碼來源:NewUserDialog.php

示例8: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new example_addressbook($rcube->api);
     $this->assertInstanceOf('example_addressbook', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:rcg2015,項目名稱:roundcubemail,代碼行數:10,代碼來源:ExampleAddressbook.php

示例9: ham

 public function ham(&$uids, $mbox)
 {
     $rcmail = rcube::get_instance();
     $storage = $rcmail->storage;
     $new_uids = array();
     foreach ($uids as $uid) {
         $saved = false;
         $message = new rcube_message($uid);
         if (sizeof($message->attachments) > 0) {
             foreach ($message->attachments as $part) {
                 if ($part->ctype_primary == 'message' && $part->ctype_secondary == 'rfc822' && $part->ctype_parameters['x-spam-type'] == 'original') {
                     $orig_message_raw = $message->get_part_body($part->mime_id);
                     $saved = $storage->save_message($mbox, $orig_message_raw);
                     if ($saved !== false) {
                         $rcmail->output->command('rcmail_markasjunk2_move', null, $uid);
                         array_push($new_uids, $saved);
                     }
                 }
             }
         }
     }
     if (sizeof($new_uids) > 0) {
         $uids = $new_uids;
     }
 }
開發者ID:nciftci,項目名稱:plugins,代碼行數:25,代碼來源:sa_detach.php

示例10: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new newmail_notifier($rcube->api);
     $this->assertInstanceOf('newmail_notifier', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:rcg2015,項目名稱:roundcubemail,代碼行數:10,代碼來源:NewmailNotifier.php

示例11: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new debug_logger($rcube->api);
     $this->assertInstanceOf('debug_logger', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:JotapePinheiro,項目名稱:roundcubemail,代碼行數:10,代碼來源:DebugLogger.php

示例12: import

 /**
  *
  */
 public function import($csv)
 {
     // convert to UTF-8
     $head = substr($csv, 0, 4096);
     $fallback = rcube::get_instance()->config->get('default_charset', 'ISO-8859-1');
     // fallback to Latin-1?
     $charset = rcube_charset::detect($head, RCUBE_CHARSET);
     $csv = rcube_charset::convert($csv, $charset);
     $head = '';
     $this->map = array();
     // Parse file
     foreach (preg_split("/[\r\n]+/", $csv) as $i => $line) {
         $elements = $this->parse_line($line);
         if (empty($elements)) {
             continue;
         }
         // Parse header
         if (empty($this->map)) {
             $this->parse_header($elements);
             if (empty($this->map)) {
                 break;
             }
         } else {
             $this->csv_to_vcard($elements);
         }
     }
 }
開發者ID:CDN-Sparks,項目名稱:owncloud,代碼行數:30,代碼來源:rcube_csv2vcard.php

示例13: init

 function init()
 {
     $this->rc = rcube::get_instance();
     $this->add_hook('authenticate', array($this, 'authentication'));
     $this->add_hook('storage_connect', array($this, 'storage_connection'));
     $this->add_hook('smtp_connect', array($this, 'smtp_connection'));
 }
開發者ID:fetlock,項目名稱:roundcube-plugin-runbox-authentication,代碼行數:7,代碼來源:runbox_authentication.php

示例14: init

 function init()
 {
     $this->rc = rcube::get_instance();
     // register actions
     $this->register_action('plugin.managesieve', array($this, 'managesieve_actions'));
     $this->register_action('plugin.managesieve-action', array($this, 'managesieve_actions'));
     $this->register_action('plugin.managesieve-vacation', array($this, 'managesieve_actions'));
     $this->register_action('plugin.managesieve-save', array($this, 'managesieve_save'));
     $this->register_action('plugin.managesieve-saveraw', array($this, 'managesieve_saveraw'));
     if ($this->rc->task == 'settings') {
         $this->add_hook('settings_actions', array($this, 'settings_actions'));
         $this->init_ui();
     } else {
         if ($this->rc->task == 'mail') {
             // register message hook
             if ($this->rc->action == 'show') {
                 $this->add_hook('message_headers_output', array($this, 'mail_headers'));
             }
             // inject Create Filter popup stuff
             if (empty($this->rc->action) || $this->rc->action == 'show' || strpos($this->rc->action, 'plugin.managesieve') === 0) {
                 $this->mail_task_handler();
             }
         }
     }
 }
開發者ID:jimjag,項目名稱:roundcubemail,代碼行數:25,代碼來源:managesieve.php

示例15: test_constructor

 /**
  * Plugin object construction test
  */
 function test_constructor()
 {
     $rcube = rcube::get_instance();
     $plugin = new virtuser_file($rcube->api);
     $this->assertInstanceOf('virtuser_file', $plugin);
     $this->assertInstanceOf('rcube_plugin', $plugin);
 }
開發者ID:rcg2015,項目名稱:roundcubemail,代碼行數:10,代碼來源:VirtuserFile.php


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