public function getAllPhotos($offset = null, $limit = null, $exclude = array()) { $result = ApuPhotoPeer::retrieveAll($offset, $limit, $exclude); if (is_null($offset) and is_null($limit)) { return $result['objects']; } return $result; }
protected function save() { $photo = $this->options['id'] == 0 ? new ApuPhoto() : ApuPhotoPeer::retrieveByPk($this->options['id']); $photo->fromArray($this->apuPhoto, BasePeer::TYPE_FIELDNAME); $photo->save(); $this->object = $photo; $this->_setResponse(); return $photo; }
/** * Retrieve multiple objects by pkey. * * @param array $pks List of primary keys * @param PropelPDO $con the connection to use * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(ApuPhotoPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(ApuPhotoPeer::DATABASE_NAME); $criteria->add(ApuPhotoPeer::ID, $pks, Criteria::IN); $objs = ApuPhotoPeer::doSelect($criteria, $con); } return $objs; }