当前位置: 首页>>代码示例>>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;未经允许,请勿转载。