"Fossies" - the Fresh Open Source Software Archive

Member "icingaweb2-2.9.1/library/vendor/Zend/Log/Filter/Abstract.php" (27 Jul 2021, 1702 Bytes) of package /linux/www/icingaweb2-2.9.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code 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_Log
   17  * @subpackage Writer
   18  * @copyright  Copyright (c) 2005-2015 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_Log_Filter_Interface */
   24 
   25 /** @see Zend_Log_FactoryInterface */
   26 
   27 /**
   28  * @category   Zend
   29  * @package    Zend_Log
   30  * @subpackage Filter
   31  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
   32  * @license    http://framework.zend.com/license/new-bsd     New BSD License
   33  * @version    $Id$
   34  */
   35 abstract class Zend_Log_Filter_Abstract
   36     implements Zend_Log_Filter_Interface, Zend_Log_FactoryInterface
   37 {
   38     /**
   39      * Validate and optionally convert the config to array
   40      *
   41      * @param  array|Zend_Config $config Zend_Config or Array
   42      * @return array
   43      * @throws Zend_Log_Exception
   44      */
   45     static protected function _parseConfig($config)
   46     {
   47         if ($config instanceof Zend_Config) {
   48             $config = $config->toArray();
   49         }
   50 
   51         if (!is_array($config)) {
   52             throw new Zend_Log_Exception('Configuration must be an array or instance of Zend_Config');
   53         }
   54 
   55         return $config;
   56     }
   57 }