示例#1
0
 /**
  * Method to invalidate the instance pool of all tables related to sf_guard_user
  * by a foreign key with ON DELETE CASCADE
  */
 public static function clearRelatedInstancePool()
 {
     // Invalidate objects in PersonalcirugiaPeer instance pool,
     // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
     PersonalcirugiaPeer::clearInstancePool();
     // Invalidate objects in sfGuardUserPermissionPeer instance pool,
     // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
     sfGuardUserPermissionPeer::clearInstancePool();
     // Invalidate objects in sfGuardUserGroupPeer instance pool,
     // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
     sfGuardUserGroupPeer::clearInstancePool();
     // Invalidate objects in sfGuardRememberKeyPeer instance pool,
     // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
     sfGuardRememberKeyPeer::clearInstancePool();
 }
示例#2
0
 /**
  * Method to invalidate the instance pool of all tables related to hc_agenda
  * by a foreign key with ON DELETE CASCADE
  */
 public static function clearRelatedInstancePool()
 {
     // Invalidate objects in PersonalcirugiaPeer instance pool,
     // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
     PersonalcirugiaPeer::clearInstancePool();
     // Invalidate objects in ProcedimientregrogramadoPeer instance pool,
     // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.
     ProcedimientregrogramadoPeer::clearInstancePool();
 }
示例#3
0
 /**
  * Populates the object using an array.
  *
  * This is particularly useful when populating an object from one of the
  * request arrays (e.g. $_POST).  This method goes through the column
  * names, checking to see whether a matching key exists in populated
  * array. If so the setByName() method is called for that column.
  *
  * You can specify the key type of the array by additionally passing one
  * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME,
  * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM.
  * The default key type is the column's BasePeer::TYPE_PHPNAME
  *
  * @param array  $arr     An array to populate the object from.
  * @param string $keyType The type of keys the array uses.
  * @return void
  */
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = PersonalcirugiaPeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setPersonalId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setAgendaId($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setPersonalNombre($arr[$keys[3]]);
     }
     if (array_key_exists($keys[4], $arr)) {
         $this->setTipo($arr[$keys[4]]);
     }
     if (array_key_exists($keys[5], $arr)) {
         $this->setStatus($arr[$keys[5]]);
     }
     if (array_key_exists($keys[6], $arr)) {
         $this->setPrograma($arr[$keys[6]]);
     }
     if (array_key_exists($keys[7], $arr)) {
         $this->setInicia($arr[$keys[7]]);
     }
     if (array_key_exists($keys[8], $arr)) {
         $this->setTransoperatorio($arr[$keys[8]]);
     }
     if (array_key_exists($keys[9], $arr)) {
         $this->setFinaliza($arr[$keys[9]]);
     }
     if (array_key_exists($keys[10], $arr)) {
         $this->setTurno($arr[$keys[10]]);
     }
     if (array_key_exists($keys[11], $arr)) {
         $this->setCreatedAt($arr[$keys[11]]);
     }
 }
 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      PropelPDO $con the connection to use
  * @return Personalcirugia[]
  * @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(PersonalcirugiaPeer::DATABASE_NAME, Propel::CONNECTION_READ);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria(PersonalcirugiaPeer::DATABASE_NAME);
         $criteria->add(PersonalcirugiaPeer::ID, $pks, Criteria::IN);
         $objs = PersonalcirugiaPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
 /**
  * Filter the query on the tipo column
  *
  * @param     mixed $tipo The value to use as filter
  * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
  *
  * @return PersonalcirugiaQuery The current query, for fluid interface
  * @throws PropelException - if the value is not accepted by the enum.
  */
 public function filterByTipo($tipo = null, $comparison = null)
 {
     $valueSet = PersonalcirugiaPeer::getValueSet(PersonalcirugiaPeer::TIPO);
     if (is_scalar($tipo)) {
         if (!in_array($tipo, $valueSet)) {
             throw new PropelException(sprintf('Value "%s" is not accepted in this enumerated column', $tipo));
         }
         $tipo = array_search($tipo, $valueSet);
     } elseif (is_array($tipo)) {
         $convertedValues = array();
         foreach ($tipo as $value) {
             if (!in_array($value, $valueSet)) {
                 throw new PropelException(sprintf('Value "%s" is not accepted in this enumerated column', $value));
             }
             $convertedValues[] = array_search($value, $valueSet);
         }
         $tipo = $convertedValues;
         if (null === $comparison) {
             $comparison = Criteria::IN;
         }
     }
     return $this->addUsingAlias(PersonalcirugiaPeer::TIPO, $tipo, $comparison);
 }