Permalink
Browse files

updating Log class to remove dependency on DIC, now uses constructor …

…injection
  • Loading branch information...
1 parent ac4af4f commit 53eaacd857106f318c38c191c76c408c74feb318 @enygma committed Aug 8, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 Shield/Log.php
View
@@ -2,8 +2,10 @@
namespace Shield;
-class Log extends Base
+class Log
{
+ private $config = null;
+
/**
* Path to the log file
* @var string
@@ -58,10 +60,10 @@ public function makeLogPath($logPath=null)
*
* @return null
*/
- public function __construct(Di $di)
+ public function __construct(\Shield\Config $config)
{
// check config for a path or set a default logging path
- $logPath = $di->get('Config')->get('log_path');
+ $logPath = $config->get('log_path');
if ($logPath !== null && is_dir(realpath($logPath)) && is_writable($logPath)) {
$this->setLogPath(realpath($logPath));

0 comments on commit 53eaacd

Please sign in to comment.