Lemurion
Новичок
Добрый вечер, уважаемые. ООП начал изучать совсем недавно, и уже возникла проблемка. Есть такая конструкция
Собственно суть вопроса: как мне вкрутить класс db чтобы он работал внутри ENGN в виде $this->db->query('something');? ткните пожалуйста носом 
Заранее благодарен.
PHP:
class db {
//методы
}
abstract class Server {
protected $_data = array();
protected $_response = null;
protected $_timeout = null;
protected $_started_at = null;
public function __construct() {
$this->_started_at = time();
}
public function handleRequest() {}
protected function _makeResponse() {}
protected function _sendResponse() {
echo $this->_response();
}
}
class ENGN extends Server {
public function __construct($timeout = 360) {
parent::__construct();
$this->_timeout = $timeout;
set_time_limit($timeout + 2);
}
public function handleRequest() {
//тут методы которые хочу использовать из класса db
$this->_makeResponse()
->_sendResponse();
}
sleep(2);
}
}
}

Заранее благодарен.