Constructor injection
<?php class Database { protected $sql; public function query($sql) { $this->sql = $sql; } } class Model { protected $db; public function __construct() { $this->db = new Database; } }