/** * 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 phpname (e.g. 'AuthorId') * * @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 = NotificacionesPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setNotid($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setSoporte($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setTipo($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setTipoNoti($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setIdFichero($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setFecha($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setHoraProceso($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setProcesado($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setHayQueParar($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setModelo($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setTitularidad($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setPresentacion($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setForma($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setIdUpload($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setPfRazonS($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setPfCifNif($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setPfNombre($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setPfApellido1($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setPfApellido2($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setPfNif($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setPfCargo($arr[$keys[20]]); } if (array_key_exists($keys[21], $arr)) { $this->setDecRazonS($arr[$keys[21]]); } if (array_key_exists($keys[22], $arr)) { $this->setDecDireccion($arr[$keys[22]]); } if (array_key_exists($keys[23], $arr)) { $this->setDecLocalidad($arr[$keys[23]]); } if (array_key_exists($keys[24], $arr)) { $this->setDecCp($arr[$keys[24]]); } if (array_key_exists($keys[25], $arr)) { $this->setDecProvincia($arr[$keys[25]]); } if (array_key_exists($keys[26], $arr)) { $this->setDecPais($arr[$keys[26]]); } if (array_key_exists($keys[27], $arr)) { $this->setDecTel($arr[$keys[27]]); } if (array_key_exists($keys[28], $arr)) { $this->setDecFax($arr[$keys[28]]); } if (array_key_exists($keys[29], $arr)) { $this->setDecMail($arr[$keys[29]]); } if (array_key_exists($keys[30], $arr)) { $this->setDecForma($arr[$keys[30]]); } if (array_key_exists($keys[31], $arr)) { $this->setRfNombre($arr[$keys[31]]); } if (array_key_exists($keys[32], $arr)) { $this->setRfActividad($arr[$keys[32]]); } if (array_key_exists($keys[33], $arr)) { $this->setRfCif($arr[$keys[33]]); } if (array_key_exists($keys[34], $arr)) { $this->setRfDomicilio($arr[$keys[34]]); } if (array_key_exists($keys[35], $arr)) { $this->setRfLocalidad($arr[$keys[35]]); } if (array_key_exists($keys[36], $arr)) { $this->setRfCp($arr[$keys[36]]); } if (array_key_exists($keys[37], $arr)) { $this->setRfProvincia($arr[$keys[37]]); } if (array_key_exists($keys[38], $arr)) { $this->setRfPais($arr[$keys[38]]); } if (array_key_exists($keys[39], $arr)) { $this->setRfTel($arr[$keys[39]]); } if (array_key_exists($keys[40], $arr)) { $this->setRfFax($arr[$keys[40]]); } if (array_key_exists($keys[41], $arr)) { $this->setRfMail($arr[$keys[41]]); } if (array_key_exists($keys[42], $arr)) { $this->setDrNombreof($arr[$keys[42]]); } if (array_key_exists($keys[43], $arr)) { $this->setDrCif($arr[$keys[43]]); } if (array_key_exists($keys[44], $arr)) { $this->setDrDirpostal($arr[$keys[44]]); } if (array_key_exists($keys[45], $arr)) { $this->setDrLocalidad($arr[$keys[45]]); } if (array_key_exists($keys[46], $arr)) { $this->setDrCp($arr[$keys[46]]); } if (array_key_exists($keys[47], $arr)) { $this->setDrProvincia($arr[$keys[47]]); } if (array_key_exists($keys[48], $arr)) { $this->setDrPais($arr[$keys[48]]); } if (array_key_exists($keys[49], $arr)) { $this->setDrTel($arr[$keys[49]]); } if (array_key_exists($keys[50], $arr)) { $this->setDrFax($arr[$keys[50]]); } if (array_key_exists($keys[51], $arr)) { $this->setDrMail($arr[$keys[51]]); } if (array_key_exists($keys[52], $arr)) { $this->setTipoSolicitud($arr[$keys[52]]); } if (array_key_exists($keys[53], $arr)) { $this->setAcModResponsable($arr[$keys[53]]); } if (array_key_exists($keys[54], $arr)) { $this->setAcModCifNifAnt($arr[$keys[54]]); } if (array_key_exists($keys[55], $arr)) { $this->setAcModServicioUnidad($arr[$keys[55]]); } if (array_key_exists($keys[56], $arr)) { $this->setAcModDisposicion($arr[$keys[56]]); } if (array_key_exists($keys[57], $arr)) { $this->setAcModIdenFinalid($arr[$keys[57]]); } if (array_key_exists($keys[58], $arr)) { $this->setAcModEncargado($arr[$keys[58]]); } if (array_key_exists($keys[59], $arr)) { $this->setAcModEstructSistema($arr[$keys[59]]); } if (array_key_exists($keys[60], $arr)) { $this->setAcModMedidasSeg($arr[$keys[60]]); } if (array_key_exists($keys[61], $arr)) { $this->setAcModOrigen($arr[$keys[61]]); } if (array_key_exists($keys[62], $arr)) { $this->setAcModTransInter($arr[$keys[62]]); } if (array_key_exists($keys[63], $arr)) { $this->setAcModComunicCes($arr[$keys[63]]); } if (array_key_exists($keys[64], $arr)) { $this->setAcSuprMotivos($arr[$keys[64]]); } if (array_key_exists($keys[65], $arr)) { $this->setAcSuprDestinoPrevisiones($arr[$keys[65]]); } if (array_key_exists($keys[66], $arr)) { $this->setAcSuprCifnif($arr[$keys[66]]); } if (array_key_exists($keys[67], $arr)) { $this->setEtNombre($arr[$keys[67]]); } if (array_key_exists($keys[68], $arr)) { $this->setEtCif($arr[$keys[68]]); } if (array_key_exists($keys[69], $arr)) { $this->setEtDirpostal($arr[$keys[69]]); } if (array_key_exists($keys[70], $arr)) { $this->setEtLocalidad($arr[$keys[70]]); } if (array_key_exists($keys[71], $arr)) { $this->setEtCp($arr[$keys[71]]); } if (array_key_exists($keys[72], $arr)) { $this->setEtProvincia($arr[$keys[72]]); } if (array_key_exists($keys[73], $arr)) { $this->setEtPais($arr[$keys[73]]); } if (array_key_exists($keys[74], $arr)) { $this->setEtTel($arr[$keys[74]]); } if (array_key_exists($keys[75], $arr)) { $this->setEtFax($arr[$keys[75]]); } if (array_key_exists($keys[76], $arr)) { $this->setEtMail($arr[$keys[76]]); } if (array_key_exists($keys[77], $arr)) { $this->setIdnNombre($arr[$keys[77]]); } if (array_key_exists($keys[78], $arr)) { $this->setIdnDescripcion($arr[$keys[78]]); } if (array_key_exists($keys[79], $arr)) { $this->setIdnFinalidades($arr[$keys[79]]); } if (array_key_exists($keys[80], $arr)) { $this->setIndicaInte($arr[$keys[80]]); } if (array_key_exists($keys[81], $arr)) { $this->setIndicaOtras($arr[$keys[81]]); } if (array_key_exists($keys[82], $arr)) { $this->setIndicFap($arr[$keys[82]]); } if (array_key_exists($keys[83], $arr)) { $this->setIndicRp($arr[$keys[83]]); } if (array_key_exists($keys[84], $arr)) { $this->setIndicEp($arr[$keys[84]]); } if (array_key_exists($keys[85], $arr)) { $this->setIndicAp($arr[$keys[85]]); } if (array_key_exists($keys[86], $arr)) { $this->setOpColectivos($arr[$keys[86]]); } if (array_key_exists($keys[87], $arr)) { $this->setOpOtroscol($arr[$keys[87]]); } if (array_key_exists($keys[88], $arr)) { $this->setIndIde($arr[$keys[88]]); } if (array_key_exists($keys[89], $arr)) { $this->setIndAs($arr[$keys[89]]); } if (array_key_exists($keys[90], $arr)) { $this->setIndR($arr[$keys[90]]); } if (array_key_exists($keys[91], $arr)) { $this->setIndC($arr[$keys[91]]); } if (array_key_exists($keys[92], $arr)) { $this->setIndRe($arr[$keys[92]]); } if (array_key_exists($keys[93], $arr)) { $this->setIndSal($arr[$keys[93]]); } if (array_key_exists($keys[94], $arr)) { $this->setIndSexo($arr[$keys[94]]); } if (array_key_exists($keys[95], $arr)) { $this->setIndNif($arr[$keys[95]]); } if (array_key_exists($keys[96], $arr)) { $this->setIndSs($arr[$keys[96]]); } if (array_key_exists($keys[97], $arr)) { $this->setIndNA($arr[$keys[97]]); } if (array_key_exists($keys[98], $arr)) { $this->setIndTs($arr[$keys[98]]); } if (array_key_exists($keys[99], $arr)) { $this->setIndDir($arr[$keys[99]]); } if (array_key_exists($keys[100], $arr)) { $this->setIndTel($arr[$keys[100]]); } if (array_key_exists($keys[101], $arr)) { $this->setIndHuella($arr[$keys[101]]); } if (array_key_exists($keys[102], $arr)) { $this->setIndImg($arr[$keys[102]]); } if (array_key_exists($keys[103], $arr)) { $this->setIndMarcas($arr[$keys[103]]); } if (array_key_exists($keys[104], $arr)) { $this->setIndFirma($arr[$keys[104]]); } if (array_key_exists($keys[105], $arr)) { $this->setTdOtrosprotegidos($arr[$keys[105]]); } if (array_key_exists($keys[106], $arr)) { $this->setTdOtrostipificados($arr[$keys[106]]); } if (array_key_exists($keys[107], $arr)) { $this->setTdOtrostiposdatos($arr[$keys[107]]); } if (array_key_exists($keys[108], $arr)) { $this->setTdTratamiento($arr[$keys[108]]); } if (array_key_exists($keys[109], $arr)) { $this->setSeguridad($arr[$keys[109]]); } if (array_key_exists($keys[110], $arr)) { $this->setCdDestinatarios($arr[$keys[110]]); } if (array_key_exists($keys[111], $arr)) { $this->setCdOtrosdestinatarios($arr[$keys[111]]); } if (array_key_exists($keys[112], $arr)) { $this->setPaisesDestina($arr[$keys[112]]); } if (array_key_exists($keys[113], $arr)) { $this->setCatDestina($arr[$keys[113]]); } if (array_key_exists($keys[114], $arr)) { $this->setOtroPaisDestina($arr[$keys[114]]); } }
/** * Returns the number of related Notificaciones objects. * * @param Criteria $criteria * @param boolean $distinct * @param PropelPDO $con * @return int Count of related Notificaciones objects. * @throws PropelException */ public function countNotificacioness(Criteria $criteria = null, $distinct = false, PropelPDO $con = null) { if ($criteria === null) { $criteria = new Criteria(FormularioPeer::DATABASE_NAME); } else { $criteria = clone $criteria; } if ($distinct) { $criteria->setDistinct(); } $count = null; if ($this->collNotificacioness === null) { if ($this->isNew()) { $count = 0; } else { $criteria->add(NotificacionesPeer::ID_FICHERO, $this->id_formulario); $count = NotificacionesPeer::doCount($criteria, $con); } } else { // criteria has no effect for a new object if (!$this->isNew()) { // the following code is to determine if a new query is // called for. If the criteria is the same as the last // one, just return count of the collection. $criteria->add(NotificacionesPeer::ID_FICHERO, $this->id_formulario); if (!isset($this->lastNotificacionesCriteria) || !$this->lastNotificacionesCriteria->equals($criteria)) { $count = NotificacionesPeer::doCount($criteria, $con); } else { $count = count($this->collNotificacioness); } } else { $count = count($this->collNotificacioness); } } return $count; }
/** * 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(NotificacionesPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(NotificacionesPeer::DATABASE_NAME); $criteria->add(NotificacionesPeer::NOTID, $pks, Criteria::IN); $objs = NotificacionesPeer::doSelect($criteria, $con); } return $objs; }
public function executeParar(sfWebRequest $request) { $id_fichero = $request->getParameter('id_fichero'); $id_notificacion = $request->getParameter('id_notificacion', null); if ($id_notificacion != null) { $notificacion = NotificacionesPeer::retrieveByPK($id_notificacion); } else { $notificacion = null; } if ($notificacion instanceof Notificaciones) { $notificacion->setHayQueParar(true); $notificacion->save(); //ESTO LO HAGO ASI PORQUE NO HAY UN PROCESO BACKGROUND QUE TRATE LAS NOTIFICACIONES. //CUANDO LO HAYA ESTO HAY QUE QUITARLO YA QUE LA BORRARA EL OTRO PROCESO sleep(5); $notificacion->delete(); } return $this->redirect('formularios/edit?id_formulario=' . $id_fichero); }