13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Log |
16 * @package Zend_Log |
17 * @subpackage Writer |
17 * @subpackage Writer |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 * @version $Id: Mock.php 20096 2010-01-06 02:05:09Z bkarwin $ |
20 * @version $Id: Mock.php 24593 2012-01-05 20:35:02Z matthew $ |
21 */ |
21 */ |
22 |
22 |
23 /** Zend_Log_Writer_Abstract */ |
23 /** Zend_Log_Writer_Abstract */ |
24 require_once 'Zend/Log/Writer/Abstract.php'; |
24 require_once 'Zend/Log/Writer/Abstract.php'; |
25 |
25 |
26 /** |
26 /** |
27 * @category Zend |
27 * @category Zend |
28 * @package Zend_Log |
28 * @package Zend_Log |
29 * @subpackage Writer |
29 * @subpackage Writer |
30 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
30 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
31 * @license http://framework.zend.com/license/new-bsd New BSD License |
31 * @license http://framework.zend.com/license/new-bsd New BSD License |
32 * @version $Id: Mock.php 20096 2010-01-06 02:05:09Z bkarwin $ |
32 * @version $Id: Mock.php 24593 2012-01-05 20:35:02Z matthew $ |
33 */ |
33 */ |
34 class Zend_Log_Writer_Mock extends Zend_Log_Writer_Abstract |
34 class Zend_Log_Writer_Mock extends Zend_Log_Writer_Abstract |
35 { |
35 { |
36 /** |
36 /** |
37 * array of log events |
37 * array of log events |
|
38 * |
|
39 * @var array |
38 */ |
40 */ |
39 public $events = array(); |
41 public $events = array(); |
40 |
42 |
41 /** |
43 /** |
42 * shutdown called? |
44 * shutdown called? |
|
45 * |
|
46 * @var boolean |
43 */ |
47 */ |
44 public $shutdown = false; |
48 public $shutdown = false; |
45 |
49 |
46 /** |
50 /** |
47 * Write a message to the log. |
51 * Write a message to the log. |
64 $this->shutdown = true; |
68 $this->shutdown = true; |
65 } |
69 } |
66 |
70 |
67 /** |
71 /** |
68 * Create a new instance of Zend_Log_Writer_Mock |
72 * Create a new instance of Zend_Log_Writer_Mock |
69 * |
73 * |
70 * @param array|Zend_Config $config |
74 * @param array|Zend_Config $config |
71 * @return Zend_Log_Writer_Mock |
75 * @return Zend_Log_Writer_Mock |
72 * @throws Zend_Log_Exception |
|
73 */ |
76 */ |
74 static public function factory($config) |
77 static public function factory($config) |
75 { |
78 { |
76 return new self(); |
79 return new self(); |
77 } |
80 } |
78 } |
81 } |