protected function execute() { if ($this->currentStatement === null) { $this->currentStatement = $this->db->query($this->buildQuery()); $this->rowCount = $this->currentStatement->rowCount(); } return $this->currentStatement; }
/** * {@inheritdoc} */ public function count() { if (null === $this->rowCount) { if ($this->rowCountCalculated) { $this->doCalcRowCount(); } else { if (null === $this->stmt) { $this->rewind(); } $this->rowCount = $this->stmt->rowCount(); } } return $this->rowCount; }
/** * @return mixed */ public function rowCount() { return $this->stmt->rowCount(); }