public function logger($instance = null) { if ($instance === null) { if ($this->_logger === null) { $this->_logger = new QueryLogger(); } return $this->_logger; } $this->_logger = $instance; }