You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

rcmail_output_cli.php 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /**
  3. +-----------------------------------------------------------------------+
  4. | program/include/rcmail_output_cli.php |
  5. | |
  6. | This file is part of the Roundcube PHP suite |
  7. | Copyright (C) 2005-2014 The Roundcube Dev Team |
  8. | |
  9. | Licensed under the GNU General Public License version 3 or |
  10. | any later version with exceptions for skins & plugins. |
  11. | See the README file for a full license statement. |
  12. | CONTENTS: |
  13. | Abstract class for output generation |
  14. | |
  15. +-----------------------------------------------------------------------+
  16. | Author: Thomas Bruederli <roundcube@gmail.com> |
  17. +-----------------------------------------------------------------------+
  18. */
  19. /**
  20. * Class for output generation
  21. *
  22. * @package Webmail
  23. * @subpackage View
  24. */
  25. class rcmail_output_cli extends rcmail_output
  26. {
  27. public $type = 'cli';
  28. /**
  29. * Object constructor
  30. */
  31. public function __construct($task = null, $framed = false)
  32. {
  33. parent::__construct();
  34. }
  35. /**
  36. * Call a client method
  37. *
  38. * @see rcube_output::command()
  39. */
  40. function command()
  41. {
  42. // NOP
  43. }
  44. /**
  45. * Add a localized label to the client environment
  46. */
  47. function add_label()
  48. {
  49. // NOP
  50. }
  51. /**
  52. * Invoke display_message command
  53. *
  54. * @see rcube_output::show_message()
  55. */
  56. function show_message($message, $type = 'notice', $vars = null, $override = true, $timeout = 0)
  57. {
  58. if ($this->app->text_exists($message)) {
  59. $message = $this->app->gettext(array('name' => $message, 'vars' => $vars));
  60. }
  61. printf("[%s] %s\n", strtoupper($type), $message);
  62. }
  63. /**
  64. * Redirect to a certain url.
  65. *
  66. * @see rcube_output::redirect()
  67. */
  68. function redirect($p = array(), $delay = 1)
  69. {
  70. // NOP
  71. }
  72. /**
  73. * Send output to the client.
  74. */
  75. function send()
  76. {
  77. // NOP
  78. }
  79. }