public function query($str) { if ($this->debug) { $this->queries[] = $str; } return parent::query($str); }