public function getVLocationsJoinAcademicCalendar($criteria = null, $con = null) { include_once 'lib/model/om/BaseVLocationPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVLocations === null) { if ($this->isNew()) { $this->collVLocations = array(); } else { $criteria->add(VLocationPeer::LOCATION_ID, $this->getId()); $this->collVLocations = VLocationPeer::doSelectJoinAcademicCalendar($criteria, $con); } } else { $criteria->add(VLocationPeer::LOCATION_ID, $this->getId()); if (!isset($this->lastVLocationCriteria) || !$this->lastVLocationCriteria->equals($criteria)) { $this->collVLocations = VLocationPeer::doSelectJoinAcademicCalendar($criteria, $con); } } $this->lastVLocationCriteria = $criteria; return $this->collVLocations; }
public static function doValidate(VLocation $obj, $cols = null) { $columns = array(); if ($cols) { $dbMap = Propel::getDatabaseMap(VLocationPeer::DATABASE_NAME); $tableMap = $dbMap->getTable(VLocationPeer::TABLE_NAME); if (!is_array($cols)) { $cols = array($cols); } foreach ($cols as $colName) { if ($tableMap->containsColumn($colName)) { $get = 'get' . $tableMap->getColumn($colName)->getPhpName(); $columns[$colName] = $obj->{$get}(); } } } else { } $res = BasePeer::doValidate(VLocationPeer::DATABASE_NAME, VLocationPeer::TABLE_NAME, $columns); if ($res !== true) { $request = sfContext::getInstance()->getRequest(); foreach ($res as $failed) { $col = VLocationPeer::translateFieldname($failed->getColumn(), BasePeer::TYPE_COLNAME, BasePeer::TYPE_PHPNAME); $request->setError($col, $failed->getMessage()); } } return $res; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VLocationPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setLocationId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setCapacity($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setCampus($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setLocationCategoryId($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setDepartmentId($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setRegTestPeriodId($arr[$keys[5]]); } }