public function countPresentedEmendamentiAtDate($date = null) { if (is_null($date)) { $date = date('Y-m-d'); } return OppAttoHasEmendamentoPeer::countPresentedRelatedToAtDate($this->getId(), $date); }