web/lib/Zend/Log/Writer/Stream.php
changeset 807 877f952ae2bd
parent 207 621fa6caec0c
child 1230 68c69c656a2c
--- a/web/lib/Zend/Log/Writer/Stream.php	Thu Mar 21 17:31:31 2013 +0100
+++ b/web/lib/Zend/Log/Writer/Stream.php	Thu Mar 21 19:50:53 2013 +0100
@@ -15,9 +15,9 @@
  * @category   Zend
  * @package    Zend_Log
  * @subpackage Writer
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id: Stream.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version    $Id: Stream.php 24593 2012-01-05 20:35:02Z matthew $
  */
 
 /** Zend_Log_Writer_Abstract */
@@ -30,14 +30,15 @@
  * @category   Zend
  * @package    Zend_Log
  * @subpackage Writer
- * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
+ * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
  * @license    http://framework.zend.com/license/new-bsd     New BSD License
- * @version    $Id: Stream.php 20096 2010-01-06 02:05:09Z bkarwin $
+ * @version    $Id: Stream.php 24593 2012-01-05 20:35:02Z matthew $
  */
 class Zend_Log_Writer_Stream extends Zend_Log_Writer_Abstract
 {
     /**
      * Holds the PHP stream to log to.
+     *
      * @var null|stream
      */
     protected $_stream = null;
@@ -45,13 +46,15 @@
     /**
      * Class Constructor
      *
-     * @param  streamOrUrl     Stream or URL to open as a stream
-     * @param  mode            Mode, only applicable if a URL is given
+     * @param array|string|resource $streamOrUrl Stream or URL to open as a stream
+     * @param string|null $mode Mode, only applicable if a URL is given
+     * @return void
+     * @throws Zend_Log_Exception
      */
-    public function __construct($streamOrUrl, $mode = NULL)
+    public function __construct($streamOrUrl, $mode = null)
     {
         // Setting the default
-        if ($mode === NULL) {
+        if (null === $mode) {
             $mode = 'a';
         }
 
@@ -81,30 +84,29 @@
 
         $this->_formatter = new Zend_Log_Formatter_Simple();
     }
-    
+
     /**
-     * Create a new instance of Zend_Log_Writer_Mock
-     * 
+     * Create a new instance of Zend_Log_Writer_Stream
+     *
      * @param  array|Zend_Config $config
-     * @return Zend_Log_Writer_Mock
-     * @throws Zend_Log_Exception
+     * @return Zend_Log_Writer_Stream
      */
     static public function factory($config)
     {
         $config = self::_parseConfig($config);
         $config = array_merge(array(
-            'stream' => null, 
+            'stream' => null,
             'mode'   => null,
         ), $config);
 
-        $streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream']; 
-        
+        $streamOrUrl = isset($config['url']) ? $config['url'] : $config['stream'];
+
         return new self(
-            $streamOrUrl, 
+            $streamOrUrl,
             $config['mode']
         );
     }
-    
+
     /**
      * Close the stream resource.
      *
@@ -122,6 +124,7 @@
      *
      * @param  array  $event  event data
      * @return void
+     * @throws Zend_Log_Exception
      */
     protected function _write($event)
     {