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_Application |
16 * @package Zend_Application |
17 * @subpackage Resource |
17 * @subpackage Resource |
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: Log.php 20814 2010-02-01 20:13:08Z freak $ |
20 * @version $Id: Log.php 24607 2012-01-16 16:45:49Z xerkus $ |
21 */ |
21 */ |
22 |
22 |
23 /** |
23 /** |
24 * @see Zend_Application_Resource_ResourceAbstract |
24 * @see Zend_Application_Resource_ResourceAbstract |
25 */ |
25 */ |
26 require_once 'Zend/Application/Resource/ResourceAbstract.php'; |
26 require_once 'Zend/Application/Resource/ResourceAbstract.php'; |
27 |
27 |
28 |
28 |
29 /** |
29 /** |
30 * Resource for initializing the locale |
30 * Resource for initializing logger |
31 * |
31 * |
32 * @uses Zend_Application_Resource_ResourceAbstract |
32 * @uses Zend_Application_Resource_ResourceAbstract |
33 * @category Zend |
33 * @category Zend |
34 * @package Zend_Application |
34 * @package Zend_Application |
35 * @subpackage Resource |
35 * @subpackage Resource |
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
38 */ |
39 class Zend_Application_Resource_Log |
39 class Zend_Application_Resource_Log |
40 extends Zend_Application_Resource_ResourceAbstract |
40 extends Zend_Application_Resource_ResourceAbstract |
41 { |
41 { |
54 return $this->getLog(); |
54 return $this->getLog(); |
55 } |
55 } |
56 |
56 |
57 /** |
57 /** |
58 * Attach logger |
58 * Attach logger |
59 * |
59 * |
60 * @param Zend_Log $log |
60 * @param Zend_Log $log |
61 * @return Zend_Application_Resource_Log |
61 * @return Zend_Application_Resource_Log |
62 */ |
62 */ |
63 public function setLog(Zend_Log $log) |
63 public function setLog(Zend_Log $log) |
64 { |
64 { |
65 $this->_log = $log; |
65 $this->_log = $log; |
66 return $this; |
66 return $this; |
67 } |
67 } |
68 |
68 |
|
69 /** |
|
70 * Retrieve logger object |
|
71 * |
|
72 * @return Zend_Log |
|
73 */ |
69 public function getLog() |
74 public function getLog() |
70 { |
75 { |
71 if (null === $this->_log) { |
76 if (null === $this->_log) { |
72 $options = $this->getOptions(); |
77 $options = $this->getOptions(); |
73 $log = Zend_Log::factory($options); |
78 $log = Zend_Log::factory($options); |