File indexing completed on 2024-12-29 05:28:03

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Service_WindowsAzure
0017  * @subpackage Diagnostics
0018  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0019  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0020  * @version    $Id$
0021  */
0022 
0023 /**
0024  * @category   Zend
0025  * @package    Zend_Service_WindowsAzure
0026  * @subpackage Diagnostics
0027  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0028  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0029  *
0030  * @property  int   BufferQuotaInMB           Buffer quota in MB
0031  * @property  int   ScheduledTransferPeriodInMinutes  Scheduled transfer period in minutes
0032  * @property  string  ScheduledTransferLogLevelFilter   Scheduled transfer log level filter
0033  * @property  array Subscriptions           Subscriptions
0034  */
0035 class Zend_Service_WindowsAzure_Diagnostics_ConfigurationWindowsEventLog
0036   extends Zend_Service_WindowsAzure_Diagnostics_ConfigurationObjectBaseAbstract
0037 {
0038     /**
0039      * Constructor
0040      * 
0041    * @param int   $bufferQuotaInMB          Buffer quota in MB
0042    * @param int   $scheduledTransferPeriodInMinutes Scheduled transfer period in minutes
0043    * @param string  $scheduledTransferLogLevelFilter  Scheduled transfer log level filter
0044    */
0045     public function __construct($bufferQuotaInMB = 0, $scheduledTransferPeriodInMinutes = 0, $scheduledTransferLogLevelFilter = Zend_Service_WindowsAzure_Diagnostics_LogLevel::UNDEFINED) 
0046     {         
0047         $this->_data = array(
0048             'bufferquotainmb'             => $bufferQuotaInMB,
0049             'scheduledtransferperiodinminutes'  => $scheduledTransferPeriodInMinutes,
0050             'scheduledtransferloglevelfilter' => $scheduledTransferLogLevelFilter,
0051           'subscriptions'           => array()
0052         );
0053     }
0054     
0055   /**
0056    * Add subscription
0057    * 
0058    * @param string  $filter Event log filter
0059    */
0060     public function addSubscription($filter)
0061     {
0062       $this->_data['subscriptions'][$filter] = $filter;
0063     }
0064     
0065   /**
0066    * Remove subscription
0067    * 
0068    * @param string  $filter Event log filter
0069    */
0070     public function removeSubscription($filter)
0071     {
0072       if (isset($this->_data['subscriptions'][$filter])) {
0073         unset($this->_data['subscriptions'][$filter]);
0074       }
0075     }
0076 }