PageRenderTime 61ms CodeModel.GetById 19ms RepoModel.GetById 1ms app.codeStats 0ms

/library/Zend/Service/WindowsAzure/Diagnostics/ConfigurationWindowsEventLog.php

https://bitbucket.org/fabiancarlos/feature_seguimentos
PHP | 91 lines | 27 code | 6 blank | 58 comment | 1 complexity | cc4e7ab11e7e15157c3941c614b6c4b5 MD5 | raw file
  1. <?php
  2. /**
  3. * Zend Framework
  4. *
  5. * LICENSE
  6. *
  7. * This source file is subject to the new BSD license that is bundled
  8. * with this package in the file LICENSE.txt.
  9. * It is also available through the world-wide-web at this URL:
  10. * http://framework.zend.com/license/new-bsd
  11. * If you did not receive a copy of the license and are unable to
  12. * obtain it through the world-wide-web, please send an email
  13. * to license@zend.com so we can send you a copy immediately.
  14. *
  15. * @category Zend
  16. * @package Zend_Service_WindowsAzure
  17. * @subpackage Diagnostics
  18. * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
  19. * @license http://framework.zend.com/license/new-bsd New BSD License
  20. * @version $Id$
  21. */
  22. /**
  23. * @see Zend_Service_WindowsAzure_Diagnostics_Exception
  24. */
  25. require_once 'Zend/Service/WindowsAzure/Diagnostics/Exception.php';
  26. /**
  27. * @see Zend_Service_WindowsAzure_Diagnostics_ConfigurationObjectBaseAbstract
  28. */
  29. require_once 'Zend/Service/WindowsAzure/Diagnostics/ConfigurationObjectBaseAbstract.php';
  30. /**
  31. * @see Zend_Service_WindowsAzure_Diagnostics_LogLevel
  32. */
  33. require_once 'Zend/Service/WindowsAzure/Diagnostics/LogLevel.php';
  34. /**
  35. * @category Zend
  36. * @package Zend_Service_WindowsAzure
  37. * @subpackage Diagnostics
  38. * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
  39. * @license http://framework.zend.com/license/new-bsd New BSD License
  40. *
  41. * @property int BufferQuotaInMB Buffer quota in MB
  42. * @property int ScheduledTransferPeriodInMinutes Scheduled transfer period in minutes
  43. * @property string ScheduledTransferLogLevelFilter Scheduled transfer log level filter
  44. * @property array Subscriptions Subscriptions
  45. */
  46. class Zend_Service_WindowsAzure_Diagnostics_ConfigurationWindowsEventLog
  47. extends Zend_Service_WindowsAzure_Diagnostics_ConfigurationObjectBaseAbstract
  48. {
  49. /**
  50. * Constructor
  51. *
  52. * @param int $bufferQuotaInMB Buffer quota in MB
  53. * @param int $scheduledTransferPeriodInMinutes Scheduled transfer period in minutes
  54. * @param string $scheduledTransferLogLevelFilter Scheduled transfer log level filter
  55. */
  56. public function __construct($bufferQuotaInMB = 0, $scheduledTransferPeriodInMinutes = 0, $scheduledTransferLogLevelFilter = Zend_Service_WindowsAzure_Diagnostics_LogLevel::UNDEFINED)
  57. {
  58. $this->_data = array(
  59. 'bufferquotainmb' => $bufferQuotaInMB,
  60. 'scheduledtransferperiodinminutes' => $scheduledTransferPeriodInMinutes,
  61. 'scheduledtransferloglevelfilter' => $scheduledTransferLogLevelFilter,
  62. 'subscriptions' => array()
  63. );
  64. }
  65. /**
  66. * Add subscription
  67. *
  68. * @param string $filter Event log filter
  69. */
  70. public function addSubscription($filter)
  71. {
  72. $this->_data['subscriptions'][$filter] = $filter;
  73. }
  74. /**
  75. * Remove subscription
  76. *
  77. * @param string $filter Event log filter
  78. */
  79. public function removeSubscription($filter)
  80. {
  81. if (isset($this->_data['subscriptions'][$filter])) {
  82. unset($this->_data['subscriptions'][$filter]);
  83. }
  84. }
  85. }