public function query(Contract $client = null) { if (null === $client) { $query = $this->database()->query($this); } else { $query = $client->query($this); } if ($this->resultClass) { $query->bindResultClass($this->resultClass); } return $query; }
public function __construct(Database\Contract $database) { $this->database = $database; $this->utility = $database->getUtility(); }