getGalleryId(); return parent::initFromForm($data); } protected function _where(Zend_Db_Select $select) { $select->where('`gi`.`galleryId` = ?', $this->getGalleryId(), Qs_Db::INT_TYPE); return $this; } public function setGalleryId($galleryId) { $this->_galleryId = (int) $galleryId; return $this; } public function getGalleryId() { if (null == $this->_galleryId) { throw new Exception('Required property "_galleryId" can not be empty'); } return $this->_galleryId; } public function getGallery($field = null, $default = null) { if (null === $this->_gallery) { $gallery = new GalleryObj(['primaryKey' => $this->getGalleryId()]); $this->_gallery = $gallery->getData(); } return array_key_exists($field, $this->_gallery) ? $this->_gallery[$field] : $default; } }