Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libs/Zend/Log/Filter/Abstract.php')
-rw-r--r--libs/Zend/Log/Filter/Abstract.php60
1 files changed, 60 insertions, 0 deletions
diff --git a/libs/Zend/Log/Filter/Abstract.php b/libs/Zend/Log/Filter/Abstract.php
new file mode 100644
index 0000000000..e0e97b89f2
--- /dev/null
+++ b/libs/Zend/Log/Filter/Abstract.php
@@ -0,0 +1,60 @@
+<?php
+/**
+ * Zend Framework
+ *
+ * LICENSE
+ *
+ * This source file is subject to the new BSD license that is bundled
+ * with this package in the file LICENSE.txt.
+ * It is also available through the world-wide-web at this URL:
+ * http://framework.zend.com/license/new-bsd
+ * If you did not receive a copy of the license and are unable to
+ * obtain it through the world-wide-web, please send an email
+ * to license@zend.com so we can send you a copy immediately.
+ *
+ * @category Zend
+ * @package Zend_Log
+ * @subpackage Writer
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id$
+ */
+
+/** @see Zend_Log_Filter_Interface */
+// require_once 'Zend/Log/Filter/Interface.php';
+
+/** @see Zend_Log_FactoryInterface */
+// require_once 'Zend/Log/FactoryInterface.php';
+
+/**
+ * @category Zend
+ * @package Zend_Log
+ * @subpackage Writer
+ * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @license http://framework.zend.com/license/new-bsd New BSD License
+ * @version $Id$
+ */
+abstract class Zend_Log_Filter_Abstract
+ implements Zend_Log_Filter_Interface, Zend_Log_FactoryInterface
+{
+ /**
+ * Validate and optionally convert the config to array
+ *
+ * @param array|Zend_Config $config Zend_Config or Array
+ * @return array
+ * @throws Zend_Log_Exception
+ */
+ static protected function _parseConfig($config)
+ {
+ if ($config instanceof Zend_Config) {
+ $config = $config->toArray();
+ }
+
+ if (!is_array($config)) {
+ // require_once 'Zend/Log/Exception.php';
+ throw new Zend_Log_Exception('Configuration must be an array or instance of Zend_Config');
+ }
+
+ return $config;
+ }
+}