![]() |
Documentación GVHIDRA 3.1.5
|
Definición en la línea 66 del archivo IgepComunicacion.php.
_getIndiceInterno | ( | $ | operacion, |
$ | indiceGlobal = -1 |
||
) |
Este mtodo, para un indice de cursor le devuelve el indice en la matriz de la operacin.
private $indiceGlobal indica el valor del indice del cursor de la operacin
Definición en la línea 929 del archivo IgepComunicacion.php.
{ if ($indiceGlobal == -1) $indiceGlobal = $this->getIndice($operacion); if (($operacion == 'buscar') or ($operacion == 'postConsultar') or ($operacion == 'seleccionarPadre') or ($operacion == 'external') or ($operacion == 'visibles') or ($operacion == 'iniciarVentana')) return $indiceGlobal; //if( ($operacion=='buscar') ) return ($indiceGlobal+1); //if( ($operacion=='postConsultar') or ($operacion=='seleccionarPadre') or ($operacion=='external') or ($operacion=='visibles')) return $indiceGlobal; $matrizAuxIndice = 'm_auxIndices_'.$operacion; $matrizGlobal = & $this-> $matrizAuxIndice; if (isset ($matrizGlobal[$indiceGlobal])) return $matrizGlobal[$indiceGlobal]; else return -1; }
_getPosicionRegistroPantalla | ( | $ | nombreCampoEnTpl | ) |
Definición en la línea 446 del archivo IgepComunicacion.php.
{ //Hay que utilizar los explode porque un campo del panel Fil puede tener un _ en el nombre. $partesCampo = explode("___", $nombreCampoEnTpl); if (count($partesCampo) == 3) { $subCampo = explode("_", $partesCampo[2]); $registro = $subCampo[1]; //En el caso de las listas multiples tenemos que eliminar el sufijo [] if(substr($registro,-2)=='[]') $registro = substr($registro,0,-2); } else //Es un campo de filtro $registro = 0; return ($registro); }
_limpiarRequest | ( | ) |
mtodo privado que utilizamos para quitar del REQUEST las variables internas de IGEP private
Definición en la línea 438 del archivo IgepComunicacion.php.
_next | ( | $ | parametroOperacion = '' | ) |
Este mtodo avanza el indice del cursor sobre la operacin y lo devuelve.
private $parametroOperacion el tipo de operacin, si no se indica se coge el fijado para la instancia
Definición en la línea 912 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $indice = 'int_'.$operacion.'Indice'; $this-> $indice ++; return $this-> $indice; }
_setAllTuplasAntiguas | ( | $ | vTuplas, |
$ | parametroOperacion = '' |
||
) |
Este mtodo guarda todas las tuplas de antiguas.
Definición en la línea 1192 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $this->reset($operacion); $indice = 0; $resultado = array (); while (($indiceInterno = $this->_getIndiceInterno($operacion)) != -1) { $this->m_datos_antiguosTpl[$indiceInterno] = $vTuplas[$indice]; ++$indice; $this->_next(); } return $resultado; } //Fin de getAllTuplasAntiguas
array_values_with_clone | ( | $ | matrix | ) | [private] |
array_values_with_clone funcion creada para evitar pasar referencias a objetos con la matriz. private
Esta funcion evita que pasemos referencias a objetos cuando obtenemos la matriz de datos. Esto evita que si un programador modifica el objeto obtenido y luego no hace el setAllTuplas, no tenga problemas con dicha modificacion.
mixed | $matrix | matriz de datos |
Definición en la línea 1102 del archivo IgepComunicacion.php.
{ //inicializamos la variables $clone = false; $result = array(); if(!is_array($matrix)) return $result; if(count($matrix)==0) return array(); //Comprobamos en la primera fila si tiene objetos $validation = $matrix[key($matrix)]; if (is_array($validation)) foreach($validation as $field) { if(is_object($field)) { $clone = true; break; } } reset($matrix); //Construimos la matriz resultado clonando si es necesario foreach($matrix as $row) { if($clone) { foreach($row as $field => $value) { if(is_object($value)) $row[$field] = clone $value; } } $result[]=$row; } return $result; }
buildDataRefreshUI | ( | $ | actionForm | ) |
Construye el array especial para los campos Dependientes. Esta funcin hace uso de los mtodos proporcionados por phrame.
private
Definición en la línea 504 del archivo IgepComunicacion.php.
{ $this->m_datosCamposDependientes['formulario'] = $actionForm->get('gvHfname'); $this->m_datosCamposDependientes['origen'] = $actionForm->get('gvHfrom'); $this->m_datosCamposDependientes['destino'] = $actionForm->get('gvHtarget'); $this->m_datosCamposDependientes['valor'] = $actionForm->get('gvHvalue'); $this->m_datosCamposDependientes['claseManejadora'] = $actionForm->get('gvHclass'); $this->m_datosCamposDependientes['registroActivo'] = $this->_getPosicionRegistroPantalla($this->m_datosCamposDependientes['origen']); unset ($_REQUEST['gvHfname']); unset ($_REQUEST['gvHfrom']); unset ($_REQUEST['gvHtarget']); unset ($_REQUEST['gvHvalue']); unset ($_REQUEST['gvHclass']); }
checkDataTypes | ( | ) |
Esta funcion se encargar de realizar la validacin de los datos en el servidor antes de realizar una operacin de insercin o actualizacin en la BD Si ha habido errores previamente en la transformacion, estan en ConfigFramework
private
Definición en la línea 587 del archivo IgepComunicacion.php.
{ $mensajeErrorValidacion = $this->_transformErrors; //En el caso de no tener operacion, fijamos como operacion los visibles. $noOperationFixed = false; if($this->getOperacion()=='') { $noOperationFixed = true; $this->setOperacion('visibles'); } $datos = $this->getAllTuplas(); if(is_array($datos) and count($datos)>0) { foreach($datos as $tupla){ foreach($tupla as $campo => $valor){ //Si el campo tiene descripcin lo validamos: if(isset($this->descCampoPanel[$campo]['instance'])){ $typeValidator = unserialize($this->descCampoPanel[$campo]['instance']); try{ $typeValidator->validate($valor); } catch(Exception $e){ $mensajeErrorValidacion[]="Campo $campo: ".$e->getMessage(); } }//fin del if si existe definicin del campo }//fin del foreach de los campos de la tupla }//fin del foreach de las tuplas } //Si no haba operacion fijada, lo dejamos asi. $noOperationFixed = false; if($noOperationFixed) $this->setOperacion(''); if(empty($mensajeErrorValidacion)) return 0; else return '<br>- '.implode('<br>- ', $mensajeErrorValidacion); }
construirArrayAbrirVentanaSeleccion | ( | $ | actionForm | ) |
Mtodo privado de igep que gastamos para construir los datos necesarios para abrir una ventana de Seleccin
private
Definición en la línea 538 del archivo IgepComunicacion.php.
{ $this->m_datosVentanaSeleccion['claseManejadora'] = $actionForm->get('claseManejadora'); //Capturamos el nombre del campo $campo = $actionForm->get('nomCampo'); $this->m_datosVentanaSeleccion['nombreCompleto'] = $campo; if (!(strpos($campo, '___') === false)) { $datos = explode('___', $campo); $datos2 = explode('_', $datos[2]); $this->m_datosVentanaSeleccion['nomCampo'] = $datos[1]; } else $this->m_datosVentanaSeleccion['nomCampo'] = $campo; $this->m_datosVentanaSeleccion['nomForm'] = $actionForm->get('nomForm'); //Calculamos el ndice $posIndice = strrpos($campo, '_'); $indice = substr($campo, $posIndice +1); $this->m_datosVentanaSeleccion['filaActual'] = $indice; $this->m_datosVentanaSeleccion['panelActua'] = $actionForm->get('panelActua'); $this->m_datosVentanaSeleccion['actionOrigen'] = $actionForm->get('actionOrigen'); }
construirArrayBorrar | ( | ) |
Construye el array de datos a Borrar y el de datos Antiguos para realizar las operaciones de DELETE correspondientes.
public
Definición en la línea 405 del archivo IgepComunicacion.php.
{ $aux_iAnterior = -1; foreach ($_REQUEST as $prop => $val) { /*Montamos el borrar*/ if (substr($prop, 0, 3) == 'cam') { //cogemos el nombre del campo q contiene el valor antiguo $campo_antiguo = 'ant'.substr($prop,3); //Para extraer el indice de la matriz $j = $this->_getPosicionRegistroPantalla($prop); $datos = explode("___", $prop); //Transformamos los datos $this->transform_User2FW($val,$this->descCampoPanel[$datos[1]]['tipo']); //Valor anterior $valueAnterior = $_REQUEST[$campo_antiguo]; $this->transform_User2FW($valueAnterior,$this->descCampoPanel[$datos[1]]['tipo']); $datos2 = explode('_', $datos[2]); $estado = 'est_'.$datos2[0].'_'.$j; if (($_REQUEST[$estado] == 'borrada')) { $this->m_datos_borrarTpl[$j][$datos[1]] = $val; $this->m_datos_antiguosTpl[$j][$datos[1]] = $valueAnterior; if ($aux_iAnterior != $j) array_push($this->m_auxIndices_borrar, $j); $aux_iAnterior = $j; } } } //fin del foreach return 0; } //Fin de ConstruirArraysBorrar
construirArrayBuscar | ( | ) |
Definición en la línea 462 del archivo IgepComunicacion.php.
{ //Limpiamos el REQUEST. $this->_limpiarRequest(); $this->_transformErrors = array(); foreach ($_REQUEST as $prop => $val) { //Transformamos los datos $this->transform_User2FW($val,$this->descCampoPanel[$prop]['tipo']); $errs_tr = ConfigFramework::getTransformErrors(); if (!empty($errs_tr)) $this->_transformErrors = array_merge($this->_transformErrors, $errs_tr); $this->m_datos_buscarTpl[0][$prop] = $val; } return 0; }
construirArrayBuscarVentanaSeleccion | ( | $ | actionForm | ) |
Mtodo privado de igep que gastamos para construir los datos necesarios para buscar en una ventana de Seleccin
private
Definición en la línea 565 del archivo IgepComunicacion.php.
{ $this->m_datosVentanaSeleccion['nomForm'] = $actionForm->get('nomForm'); $this->m_datosVentanaSeleccion['nomCampo'] = $actionForm->get('nomCampo'); $this->m_datosVentanaSeleccion['camposBusqueda'] = $actionForm->get('camposBusqueda'); $this->m_datosVentanaSeleccion['valor'] = $actionForm->get('campoBuscar'); $this->m_datosVentanaSeleccion['filaActual'] = $actionForm->get('filaActual'); $this->m_datosVentanaSeleccion['panelActua'] = $actionForm->get('panelActua'); $this->m_datosVentanaSeleccion['claseManejadora'] = $actionForm->get('claseManejadora'); $this->m_datosVentanaSeleccion['actionOrigen'] = $actionForm->get('actionOrigen'); }
construirArrayFocusChanged | ( | $ | actionForm | ) |
Definición en la línea 524 del archivo IgepComunicacion.php.
{ $this->m_datosFocusChanged['claseManejadora'] = $actionForm->get('claseManejadora'); $this->m_datosFocusChanged['nomForm'] = $actionForm->get('nomForm'); $this->m_datosFocusChanged['tipoCampo'] = $actionForm->get('tipoCampo'); $this->m_datosFocusChanged['idPanel'] = $actionForm->get('idPanel'); $this->m_datosFocusChanged['filaActual'] = $actionForm->get('filaActual'); $this->m_datosFocusChanged['filaProxima'] = $actionForm->get('filaProxima'); }
construirArrayIniciarVentana | ( | ) |
Carga los datos al iniciar la ventana. No tiene m_datos normal porque ningn campo puede tener matching
Definición en la línea 488 del archivo IgepComunicacion.php.
{ //Limpiamos el REQUEST. $this->_limpiarRequest(); $this->m_datos_iniciarVentanaTpl = null; foreach ($_REQUEST as $prop => $val) { $this->m_datos_iniciarVentanaTpl[0][$prop] = $val; } return 0; }
construirArrayOrdenarTabla | ( | $ | actionForm | ) |
Definición en la línea 518 del archivo IgepComunicacion.php.
{ $this->m_datosOrdenarTabla['claseManejadora'] = $actionForm->get('IGEPclaseM'); $this->m_datosOrdenarTabla['columna'] = $actionForm->get('IGEPcol'); $this->m_datosOrdenarTabla['orden'] = $actionForm->get('IGEPord'); }
construirArraySeleccionar | ( | ) |
Construye nicamente el array de Seleccionados. En este caso es importante tener en cuenta si se venimos de un panel Ficha o Tabla. Esto se debe a que la forma de marcar la fila seleccionada es diferente de uno a otro (la tabla permite los checks).
public
Definición en la línea 361 del archivo IgepComunicacion.php.
{ $aux_iAnterior = -1; //Como la forma de seleccionar cambia de un Ficha a un Tabla, tenemos q comprobar de donde viene $claseManejadora = $_REQUEST['claseManejadora']; //Si la variable pagActual tiene valor entonces se trata de un Ficha. if (isset ($_REQUEST['pagActual___'.$claseManejadora])) $filaActual = $_REQUEST['pagActual___'.$claseManejadora]; else $filaActual = -1; foreach ($_REQUEST as $prop => $val) { /*Montamos el seleccionar*/ if (substr($prop, 0, 3) == 'cam' OR substr($prop, 0, 3) == 'lca') { //de momento no dejamos que sean vacios //Para extraer el indice de la matriz $j = $this->_getPosicionRegistroPantalla($prop); $datos = explode('___', $prop); //Transformamos los datos $this->transform_User2FW($val,$this->descCampoPanel[$datos[1]]['tipo']); //Creamos el estado $datos2 = explode('_', $datos[2]); $estado = 'est_'.$datos2[0].'_'.$j; $check = 'check_'.$datos2[0].'_'.$j; if ((($_REQUEST[$estado] == 'nada') and (isset($_REQUEST[$check]))) or ($filaActual == $j)) { $this->m_datos_seleccionarTpl[$j][$datos[1]] = $val; if ($aux_iAnterior != $j) array_push($this->m_auxIndices_seleccionar, $j); $aux_iAnterior = $j; //Para almacenar la fila seleccionada $this->int_filaActual = $j; } } } //fin del foreach //PARCHE: Tenemos que guardarnos el nombre del check porq luego no lo sabemos //Nos guardamos la estructura de los checks para poder activarlos desde negocio $this->nombreCheckTabla = 'check_'.$datos2[0].'_'; return 0; } //Fin de ConstruirArraysSeleccionar
currentTupla | ( | $ | parametroOperacion = '' | ) |
Este mtodo devuelve una matriz con los campos que aparecen en la tpl para la tupla actual dentro del cursor de la operacion. No avanza la posiccion en el cursor.
public $parametroOperacion el tipo de operacin, si no se indica se coge el fijado para la instancia
Definición en la línea 952 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $nombreMatriz = 'm_datos_'.$operacion.'Tpl'; $indiceInterno = $this->_getIndiceInterno($operacion); $matrizInterna = & $this-> $nombreMatriz; if (isset ($matrizInterna[$indiceInterno])) { //Para evitar el problema de referencias a objetos clonamos $row = $matrizInterna[$indiceInterno]; foreach($row as $field => $value){ if(is_object($value)) $row[$field] = clone $value; } return $row; } else return 0; } //Fin function currentTupla
dameDatos | ( | $ | operacion, |
$ | nombreTabla = '' |
||
) |
Devuelve los datos que con anterioridad se han recuperado y clasificado. Para ello solicita una operacin y una tabla de la BD.
private
string | $operacion | |
string | $nombreTabla |
Definición en la línea 633 del archivo IgepComunicacion.php.
{ switch ($operacion) { case 'camposDependientes' : return $this->m_datosCamposDependientes; break; case 'abrirVentanaSeleccion' : return $this->m_datosVentanaSeleccion; break; case 'buscarVentanaSeleccion' : return $this->m_datosVentanaSeleccion; break; case 'ordenarTabla' : return $this->m_datosOrdenarTabla; break; case 'focusChanged': return $this->m_datosFocusChanged; break; default : die('Dame Datos.Operacion desconocida.'); break; } }
dameDatosAntiguos | ( | $ | nombreTabla | ) |
Devuelve los datos Antiguos para una tabla dada.
private
string | $nombreTabla |
Definición en la línea 663 del archivo IgepComunicacion.php.
{ return $this->m_datos_antiguos[$nombreTabla]; } //fin de dameDatosAntiguos
dameFilaActual | ( | ) |
Retorna el valor de la fila actual
private
Definición en la línea 673 del archivo IgepComunicacion.php.
{ return $this->int_filaActual; } //fin de dameFilaActual
damePanelActivo | ( | ) |
Definición en la línea 678 del archivo IgepComunicacion.php.
{ foreach($_REQUEST as $indice => $valor){ if (strpos($indice,'accionActivaP_')!==false){ $panelActivo = str_replace('accionActivaP_F_','',$indice); break; } } return $panelActivo; } //fin de damePanelActivo
data2Arrays | ( | ) |
Recupera los datos de pantalla y los almacena en estructuras conocidas por el Framework. Esto permite un acceso coherente a los datos por parte del programador y del propio sistema.
public
Definición en la línea 198 del archivo IgepComunicacion.php.
{ /*La estructura de los arrays es la siguiente: [Tabla] => [fila] => [campo1]=> valor, [campo2]=> valor */ $aux_iAnterior = -1; //Como la forma de seleccionar cambia de un Ficha a un Tabla, tenemos q comprobar de donde viene $filaActual = null; if(isset($_REQUEST['claseManejadora'])){ $claseManejadora = $_REQUEST['claseManejadora']; //Si la variable pagActual tiene valor entonces se trata de un Ficha. if (isset ($_REQUEST['pagActual___'.$claseManejadora])) $filaActual = $_REQUEST['pagActual___'.$claseManejadora]; } $this->_limpiarRequest(); $this->_transformErrors = array(); foreach ($_REQUEST as $prop => $val) { $errs_tr = null; switch (substr($prop, 0, 3)) { //Para los campos insertados case 'lin': //Comprobamos si existe el campo ins, si no existe este es el valor bueno. $campoReal = substr($prop,1); if(array_key_exists($campoReal,$_REQUEST)) break; $_REQUEST[$campoReal]=$val; $prop = $campoReal; case 'hin' : //Para los checks insertados case 'ins' : //Para extraer el indice de la matriz $i = $this->_getPosicionRegistroPantalla($prop); $datos = explode('___', $prop); $datos2 = explode('_', $datos[2]); $estado = 'est_'.$datos2[0].'_'.$i; //Transformamos los datos $this->transform_User2FW($val,$this->descCampoPanel[$datos[1]]['tipo']); if ($_REQUEST[$estado] == 'insertada') { if ($val != '') { //m_datos_insertar $this->m_datos_insertarTpl[$i][$datos[1]] = $val; if ($aux_iAnterior != $i) array_push($this->m_auxIndices_insertar, $i); $aux_iAnterior = $i; //Para almacenar la fila actual $this->int_filaActual = $i; //Vamos acumularlos como datos Visibles $this->m_datos_visiblesTpl[$i][$datos[1]] = $val; } else { //Para controlar el tema de los obligatorios en estos casos lo introducimos para que salte el error if($this->descCampoPanel[$datos[1]]['required']) $this->m_datos_insertarTpl[$i][$datos[1]] = $val; } } break; //para el resto de campos case 'lca': //Comprobamos si existe el campo ins, si no existe este es el valor bueno. $campoReal = substr($prop,1); if(array_key_exists($campoReal,$_REQUEST)) break; $_REQUEST[$campoReal]=$val; $prop = $campoReal; case 'cam' : /*Montamos las operaciones de borrado y actualizacin*/ //Para extraer el indice de la matriz $j = $this->_getPosicionRegistroPantalla($prop); //cogemos el nombre del campo q contiene el valor antiguo $campo_antiguo = 'ant'.substr($prop,3); $datos = explode('___', $prop); //Transformamos los datos $this->transform_User2FW($val,$this->descCampoPanel[$datos[1]]['tipo']); // guardo errores para que no se machaquen con las llamadas posteriores $errs_tr = ConfigFramework::getTransformErrors(); $datos2 = explode('_', $datos[2]); $estado = 'est_'.$datos2[0].'_'.$j; $check = 'check_'.$datos2[0].'_'.$j; //Comprobacin de vacios switch ($_REQUEST[$estado]) { case 'borrada' : //Valor anterior $valueAnterior = $_REQUEST[$campo_antiguo]; $this->transform_User2FW($valueAnterior,$this->descCampoPanel[$datos[1]]['tipo']); //m_datos_borrar //m_datos_antiguos $this->m_datos_borrarTpl[$j][$datos[1]] = $val; $this->m_datos_antiguosTpl[$j][$datos[1]] = $valueAnterior; if ($aux_iAnterior != $j) array_push($this->m_auxIndices_borrar, $j); $aux_iAnterior = $j; //Para almacenar la fila actual if (isset($_REQUEST[$check]) or $filaActual == $j) $this->int_filaActual = 0; break; case 'modificada' : //Valor anterior $valueAnterior = $_REQUEST[$campo_antiguo]; $this->transform_User2FW($valueAnterior,$this->descCampoPanel[$datos[1]]['tipo']); //m_datos_actualizar //m_datos_antiguos $this->m_datos_actualizarTpl[$j][$datos[1]] = $val; $this->m_datos_antiguosTpl[$j][$datos[1]] = $valueAnterior; if ($aux_iAnterior != $j) array_push($this->m_auxIndices_actualizar, $j); $aux_iAnterior = $j; //Para almacenar la fila actual if (isset($_REQUEST[$check]) or $filaActual == $j) $this->int_filaActual = $j; break; case 'nada' : if (isset($_REQUEST[$check]) or ($filaActual == $j)) { //m_datos_seleccionar $this->m_datos_seleccionarTpl[$j][$datos[1]] = $val; if ($aux_iAnterior != $j) array_push($this->m_auxIndices_seleccionar, $j); } $aux_iAnterior = $j; break; default : break; } //Fin switch //Vamos acumularlos como datos Visibles $this->m_datos_visiblesTpl[$j][$datos[1]] = $val; break; case 'ant' : case 'est' : break; default : //Estos son los campos que estan fuera del CWFicha //Transformamos los datos $this->transform_User2FW($val,$this->descCampoPanel[$prop]['tipo']); $this->m_datos_externalTpl[0][$prop] = $val; break; } //Fin de switch // si no se ha llamado a getTransformErrors (en cam), lo hago ahora if (is_null($errs_tr)) $errs_tr = ConfigFramework::getTransformErrors(); if (!empty($errs_tr)) $this->_transformErrors = array_merge($this->_transformErrors, $errs_tr); } //fin del foreach //Para los ficheros UpLoad foreach($_FILES as $prop => $val){ $i = $this->_getPosicionRegistroPantalla($prop); $datos = explode('___', $prop); $datos2 = explode('_', $datos[2]); $estado = 'est_'.$datos2[0].'_'.$i; if (($_REQUEST[$estado] == 'insertada') or ($_REQUEST[$estado] == 'modificada')) $this->m_datosFicherosUpLoad[$i][$datos[1]] = $val; } $this->reset(); } //Fin de data2Arrays
fetchTupla | ( | $ | parametroOperacion = '' | ) |
Este mtodo devuelve una matriz con los campos que aparecen en la tpl para la tupla actual dentro del cursor de la operacion y avanza a la siguiente posicin del cursor.
public $parametroOperacion el tipo de operacin, si no se indica se coge el fijado para la instancia
Definición en la línea 1021 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $resultado = $this->currentTupla($operacion); $this->_next($operacion); return $resultado; } //Fin function fetchTupla
getAllTuplas | ( | $ | parametroOperacion = '' | ) |
getAllTuplas metodo que devuelve la matriz de datos de la operacin activa. public
Este metodo devuelve todo el conjunto de la operacion activa. Se le puede pasar por parametro una operacion si no se quiere obtener los datos pertenecientes a la operacion activa.
string | $parametroOperacion | indica la operacion de la que se quiere obtener la matriz, no es obligatorio |
Definición en la línea 1076 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $this->reset($operacion); $nombreMatriz = 'm_datos_'.$operacion.'Tpl'; if (isset ($this-> $nombreMatriz)) return $this->array_values_with_clone($this-> $nombreMatriz); else return 0; } //Fin function getAllTuplas
getAllTuplasAntiguas | ( | $ | parametroOperacion = '' | ) |
Este mtodo devuelve todas las tuplas de antiguas para una operacion dada.
Definición en la línea 1140 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $this->reset($operacion); $indice = 0; $resultado = array (); while (($indiceInterno = $this->_getIndiceInterno($operacion)) != -1) { $resultado[$indice] = $this->m_datos_antiguosTpl[$indiceInterno]; ++$indice; $this->_next(); } return $resultado; } //Fin de getAllTuplasAntiguas
getCampo | ( | $ | nombreCampo, |
$ | parametroOperacion = '' |
||
) |
Definición en la línea 973 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $resultado = $this->currentTupla($operacion); if (isset ($resultado[$nombreCampo])) return $resultado[$nombreCampo]; else return null; } //Fin function getCampo
getFileInfo | ( | $ | nombreCampo, |
$ | parametroOperacion | ||
) |
Mtodo que devuelve para una tupla dada la informacin de un campo de tipo 'FILE' que se ha subido al servidor. private
string | nombreCampo Nombre del campo FILE del que se quiere obtener la informacin |
string | parametroOperacion Indica la operacin sobre la que se quiere la tupla |
Definición en la línea 1238 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $indiceInterno = $this->_getIndiceInterno($operacion); return $this->m_datosFicherosUpLoad[$indiceInterno][$nombreCampo]; }
getForward | ( | $ | name | ) |
Definición en la línea 1252 del archivo IgepComunicacion.php.
{ if(isset($this->_actionMapping)) return $this->_actionMapping->get($name); }
getIndice | ( | $ | parametroOperacion = '' | ) |
Este mtodo devuelve el valor del indice del cursor sobre la operacin.
public $parametroOperacion el tipo de operacin, si no se indica se coge el fijado para la instancia
Definición en la línea 877 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $indice = 'int_'.$operacion.'Indice'; return ($this-> $indice); }
getOldValue | ( | $ | nombreCampo | ) |
Este mtodo devuelve el valor antiguo de una campo para la operacion activa.
public $nombreCampo el nombre del campo del cual se quiere conocer el valor antiguo
Definición en la línea 994 del archivo IgepComunicacion.php.
{ $indice = $this->getIndice(); return $this->m_datos_antiguosTpl[$indice][$nombreCampo]; }
getOperacion | ( | ) |
Este mtodo permite el acceso a la propiedad interna que indica la operacin actual.
public
Definición en la línea 866 del archivo IgepComunicacion.php.
{ return $this->str_operacionActual; } //Fin function getOperacion
hayDatos | ( | $ | parametroOperacion = '' | ) |
Definición en la línea 1222 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $nombreMatriz = 'm_datos_'.$operacion.'Tpl'; return count($this-> $nombreMatriz); } //fin de hayDatos
IgepComunicacion | ( | $ | descCampoPanel = "" | ) |
Constructor. Recibe como parmetro el matching con el que trabajar el objeto
public
array | $matching |
Definición en la línea 182 del archivo IgepComunicacion.php.
{ $this->descCampoPanel = $descCampoPanel; $this->m_auxIndices_insertar = array (); $this->m_auxIndices_borrar = array (); $this->m_auxIndices_actualizar = array (); $this->m_auxIndices_seleccionar = array (); }
nextTupla | ( | $ | parametroOperacion = '' | ) |
Este mtodo avanza a la siguiente posicin del cursor y devuelve verdadero si quedan tuplas/registros en el cursor, y falso cuando se llega al final
public $parametroOperacion el tipo de operacin, si no se indica se coge el fijado para la instancia
Definición en la línea 1039 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $this->_next($operacion); $resultado = $this->currentTupla($operacion); return (!empty ($resultado)); } //Fin function nextTupla
posicionarEnTupla | ( | $ | indiceFila, |
$ | parametroOperacion = '' |
||
) |
posicionarEnTupla, coloca los ndices en la fila/tupla que se le indique por parmetro
private $parametroOperacion el tipo de operacin, si no se indica se coge el fijado para la instancia
Definición en la línea 893 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $indice = 'int_'.$operacion.'Indice'; if (!empty ($indiceFila)) $this-> $indice = $indiceFila; else $this-> $indice = 0; }
reset | ( | $ | parametroOperacion = '' | ) |
Este mtodo se encarga de inicializar el indice del cursor que pertenece a la operacin.
public $parametroOperacion la operacin sobre la que se quiere reinicializar el cursor
Definición en la línea 818 del archivo IgepComunicacion.php.
{ //Seleccionamos la operacion if ($parametroOperacion != '') { $operacion = $parametroOperacion; //Inicializamos el indice de la operacion a 0 $indice = 'int_'.$operacion.'Indice'; $this-> $indice = 0; } else { $operacionesBasicas = array ('insertar', 'borrar', 'actualizar', 'seleccionar', 'external', 'visibles'); foreach ($operacionesBasicas as $operacion) { $indice = 'int_'.$operacion.'Indice'; $this-> $indice = 0; } } }
setAllTuplas | ( | $ | vTuplas, |
$ | parametroOperacion = '' |
||
) |
Definición en la línea 1156 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $this->reset(); //Si tiene ms tuplas de las que teniamos borramos el contenido de la matriz TPL if (count($vTuplas) != count($this->getAllTuplas($operacion))) { $matrizInternaTpl = 'm_datos_'.$operacion.'Tpl'; $matrizInterna = 'm_datos_'.$operacion; $this-> $matrizInternaTpl = array (); $this-> $matrizInterna = array (); //Regeneramos el indice de las tuplas $numTotalTuplas = count($vTuplas); $matrizAuxIndices = 'm_auxIndices_'.$operacion; $this-> $matrizAuxIndices = array(); $i = 0; while($i<$numTotalTuplas){ array_push($this-> $matrizAuxIndices,$i); ++$i; } } if (!is_array($vTuplas)) { throw new Exception('IgepComunicacion::setAllTuplas ha de recibir un array, ahora recibe: '.var_export($vTuplas,true)); } foreach ($vTuplas as $tupla) { $this->_next($operacion); $this->setTupla($tupla, $operacion); } return 1; } //Fin de setAllTuplas
setArrayOperacion | ( | $ | m_datos | ) |
Definición en la línea 851 del archivo IgepComunicacion.php.
{ $str_operacion = $this->getOperacion(); $nombreMatriz = 'm_datos_'.$str_operacion.'Tpl'; if (is_array($m_datos)) $this-> $nombreMatriz = $m_datos; else $this-> $nombreMatriz = array (); }
setCampo | ( | $ | nombreCampo, |
$ | valorCampo, | ||
$ | parametroOperacion = '' |
||
) |
Definición en la línea 999 del archivo IgepComunicacion.php.
{ if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $indiceInterno = $this->_getIndiceInterno($operacion); $nombreMatrizTpl = 'm_datos_'.$operacion.'Tpl'; $matrizInternaTpl = & $this-> $nombreMatrizTpl; //Tenemos que aadirlo en el array adecuado. $matrizInternaTpl[$indiceInterno][$nombreCampo] = $valorCampo; } //Fin function setCampo
setLista | ( | $ | nombreCampo, |
$ | v_lista, | ||
$ | parametroOperacion = '' |
||
) |
Definición en la línea 1209 del archivo IgepComunicacion.php.
{ //Este mtodo slo tiene sentido en un postConsultar (postBuscar, postEditar, postRecargar) //Por estar razn slo se escribir en la matriz TPL if ($parametroOperacion != '') $operacion = $parametroOperacion; else $operacion = $this->getOperacion(); $indiceInterno = $this->_getIndiceInterno($operacion); $nombreMatrizTpl = 'm_datos_'.$operacion.'Tpl'; $matrizInternaTpl = & $this-> $nombreMatrizTpl; $matrizInternaTpl[$indiceInterno][$nombreCampo] = $v_lista; }
setMapping | ( | ActionMapping $ | actionMapping | ) |
Definición en la línea 1248 del archivo IgepComunicacion.php.
{ $this->_actionMapping = $actionMapping; }
setOperacion | ( | $ | parametroOperacion | ) |
Este mtodo indica a la instancia cual es la operacin en curso e inicializa el indice del cursor de dicha operacin. La operacin en curso se utilizar siempre que no se especifique como parmetro para el resto de mtodos. OJO: Falta dar una lista clara de las operaciones para el usuario (internas puede haber ms)
public $parametroOperacion el tipo de operacin: insertar, borrar, actualizar, ... hay que dar una lista fija y clara
Definición en la línea 844 del archivo IgepComunicacion.php.
setTupla | ( | $ | tupla, |
$ | str_operacion = '' |
||
) |
Definición en la línea 1049 del archivo IgepComunicacion.php.
{ if ($str_operacion != '') $operacion = $str_operacion; else $operacion = $this->getOperacion(); $indiceGlobal = ($ind = $this->getIndice()) > 0 ? ($ind -1) : 0; $indiceInterno = $this->_getIndiceInterno($operacion, $indiceGlobal); $nombreMatrizTpl = 'm_datos_'.$operacion.'Tpl'; $matrizInternaTpl = & $this-> $nombreMatrizTpl; foreach ($tupla as $nombreCampo => $valorCampo) { $matrizInternaTpl[$indiceInterno][$nombreCampo] = $valorCampo; } return 1; } //Fin function setTupla
static transform_User2FW | ( | &$ | a_parametros, |
$ | a_tipo = TIPO_CARACTER |
||
) | [static] |
Definición en la línea 1257 del archivo IgepComunicacion.php.
{ ConfigFramework::setTransformErrors(array()); if (empty($a_tipo) and !is_array($a_tipo)) $a_tipo = TIPO_CARACTER; if (!is_array($a_parametros)) { // le doy estructura de vector para no repetir el codigo $vector = false; $a_parametros = array(array('col'=>$a_parametros,),); $a_tipo = array('col'=>array('tipo'=>$a_tipo,),); } else $vector = true; if (is_array($a_tipo)) { $transformer = new IgepTransformer(true); $car_i = ConfigFramework::getNumericSeparatorsUser(); $car_n = ConfigFramework::getNumericSeparatorsFW(); $transformer->setDecimal($car_i['DECIMAL'],$car_n['DECIMAL'],$car_i['GROUP'],$car_n['GROUP']); $fecha_i = ConfigFramework::getDateMaskUser(); $fecha_n = ConfigFramework::getDateMaskFW(); $transformer->setDate($fecha_i, $fecha_n); foreach ($a_parametros as $fila => $tupla) foreach ($a_tipo as $campo => $descTipo) { $tipo_efectivo = ($descTipo['tipo']==TIPO_ENTERO? TIPO_DECIMAL: $descTipo['tipo']); if (empty($a_parametros[$fila][$campo])) { if($tipo_efectivo==TIPO_FECHA or $tipo_efectivo==TIPO_FECHAHORA) $a_parametros[$fila][$campo] = null; continue; } $num_errores = count($transformer->getTransformErrors()); $a_parametros[$fila][$campo] = $transformer->process($tipo_efectivo, $tupla[$campo]); if ($tipo_efectivo == TIPO_FECHA or $tipo_efectivo == TIPO_FECHAHORA) if (count($transformer->getTransformErrors())==$num_errores) $a_parametros[$fila][$campo] = new gvHidraTimestamp($a_parametros[$fila][$campo]); else $a_parametros[$fila][$campo] = null; } ConfigFramework::setTransformErrors($transformer->getTransformErrors()); } if (!$vector) $a_parametros = $a_parametros[0]['col']; }
array $_actionMapping [private] |
Objeto que contiene los destinos de posibles de la accin.
Definición en la línea 169 del archivo IgepComunicacion.php.
$_transformErrors [private] |
variable para acumular los errores de transformacion en data2Arrays y leerlos en checkDataTypes
Definición en la línea 174 del archivo IgepComunicacion.php.
$descCampoPanel |
Definición en la línea 102 del archivo IgepComunicacion.php.
$int_actualizarIndice |
Definición en la línea 721 del archivo IgepComunicacion.php.
int $int_borrarIndice |
Integer indice de 2o nivel para referenciar la matriz "ficticia" de borrados
private
Definición en la línea 737 del archivo IgepComunicacion.php.
int $int_buscarIndice |
Integer indice de 2o nivel para referenciar la matriz "ficticia" de buscar
private
Integer indice de 2o nivel para referenciar la matriz "ficticia" de external
private
Definición en la línea 785 del archivo IgepComunicacion.php.
$int_externalIndice |
Definición en la línea 801 del archivo IgepComunicacion.php.
$int_filaSeleccionada |
Definición en la línea 81 del archivo IgepComunicacion.php.
int $int_iniciarVentanaIndice |
Integer indice de 2o nivel para referenciar la matriz "ficticia" de iniciarVentana
private
Definición en la línea 793 del archivo IgepComunicacion.php.
int $int_insertarIndice |
Integer indice de 2o nivel para referenciar la matriz "ficticia" de inserciones
private
Definición en la línea 705 del archivo IgepComunicacion.php.
int $int_postConsultarIndice |
Integer indice de 2o nivel para referenciar la matriz "ficticia" de postConsultar
private
Definición en la línea 769 del archivo IgepComunicacion.php.
int $int_seleccionarIndice |
Integer indice de 2o nivel para referenciar la matriz "ficticia" de seleccionados
private
Definición en la línea 753 del archivo IgepComunicacion.php.
$int_seleccionarPadreIndice |
Definición en la línea 777 del archivo IgepComunicacion.php.
int $int_visiblesIndice |
Integer indice de 2o nivel para referenciar la matriz "ficticia" de visibles
private
Definición en la línea 809 del archivo IgepComunicacion.php.
array $m_auxIndices_actualizar |
Matriz de referencias a las tuplas modificadas
private
Definición en la línea 729 del archivo IgepComunicacion.php.
array $m_auxIndices_borrar |
Matriz de referencias a las tuplas borradas
private
Definición en la línea 745 del archivo IgepComunicacion.php.
array $m_auxIndices_insertar |
Matriz de referencias a las tuplas insertadas
private
Definición en la línea 713 del archivo IgepComunicacion.php.
array $m_auxIndices_seleccionar |
Matriz de referencias a las tuplas seleccionadas
private
Definición en la línea 761 del archivo IgepComunicacion.php.
$m_datos_actualizarTpl |
Definición en la línea 116 del archivo IgepComunicacion.php.
$m_datos_borrarTpl |
Definición en la línea 123 del archivo IgepComunicacion.php.
$m_datos_buscarTpl |
Definición en la línea 153 del archivo IgepComunicacion.php.
$m_datos_iniciarVentanaTpl |
Definición en la línea 162 del archivo IgepComunicacion.php.
$m_datos_insertarTpl |
Definición en la línea 109 del archivo IgepComunicacion.php.
$m_datos_postConsultarTpl |
Definición en la línea 137 del archivo IgepComunicacion.php.
$m_datos_seleccionarPadreTpl |
Definición en la línea 146 del archivo IgepComunicacion.php.
$m_datos_seleccionarTpl |
Definición en la línea 130 del archivo IgepComunicacion.php.
$m_datos_visiblesTpl |
Definición en la línea 95 del archivo IgepComunicacion.php.
$m_datosCamposDependientes |
Definición en la línea 73 del archivo IgepComunicacion.php.
$m_datosFicherosUpLoad |
Definición en la línea 160 del archivo IgepComunicacion.php.
$m_datosVentanaSeleccion |
Definición en la línea 88 del archivo IgepComunicacion.php.
$str_operacionActual |
Definición en la línea 697 del archivo IgepComunicacion.php.