Documentación GVHIDRA 3.1.5
Referencia de la Clase MappingManager
Diagrama de herencias de MappingManager
Object CustomMapping CustomMapping CustomMapping gvHidraMaps ComponentesMap

Métodos públicos

 MappingManager ()
 _AddMapping ($psIdent, $psType, $psInput= '')
 _AddForward ($psMapIdent, $psFwdIdent, $psPath='_DEFAULT_', $piRedir=0)
 _SetOptions ($psDefaultAction='ShowView', $psErrorHandler='handle_error', $piCache=0, $piErrorReporting=-1)
 _MergeMappings ($mappings)
 GetMappings ()
 GetOptions ()
 secureFW ()

Campos de datos

 $_aaMap
 $_aaOptions = array()

Atributos privados

 $_secureFW = array()

Descripción detallada

class to create Phrame Mapping arrays

Autor:
Jason E. Sweat
Desde:
2003-01-13

Definición en la línea 8 del archivo MappingManager.php.


Documentación de las funciones miembro

_AddForward ( psMapIdent,
psFwdIdent,
psPath = '_DEFAULT_',
piRedir = 0 
)

add a forward to an existing mapping

"protected" function to be used by the constructor function of a derived class

Devuelve:
boolean sucess

Definición en la línea 67 del archivo MappingManager.php.

        {
                if (!array_key_exists($psMapIdent, $this->_aaMap[_ACTION_MAPPINGS])) {
                        trigger_error("invalid mapping identifier '$psMapIdent'");
                        return false;
                }
                if (!is_string($psFwdIdent) || 0 == strlen($psFwdIdent)) {
                        trigger_error("invalid mapping forward identifier '$psFwdIdent'");
                        return false;
                }
                if (!is_string($psPath) || 0 == strlen($psPath)) {
                        trigger_error("invalid mapping forward path '$psPath'");
                        return false;
                } elseif ('_DEFAULT_' == $psPath) {
                        $psPath = $this->_aaMap[_ACTION_MAPPINGS][$psMapIdent][_INPUT];
                }
                if (1 != $piRedir) {
                        $piRedir = 0;
                }

                $a_new_fwd = array (
                         _PATH          => $psPath
                        ,_REDIRECT      => $piRedir
                        );

                $this->_aaMap[_ACTION_MAPPINGS][$psMapIdent][_ACTION_FORWARDS][$psFwdIdent] =
                        $a_new_fwd;
                //Incluimos el forward en el parse de seguridad
                $ini = strpos($psPath,'view=')+5;
                $params = strpos($psPath,'&');
                ($params)?$fin=$params-strlen($psPath):$fin=strlen($psPath);
                $this->_secureFW[] = substr($psPath,$ini,$fin);

                return true;    
        }
_AddMapping ( psIdent,
psType,
psInput = '' 
)

add a map to the mapping

"protected" function to be used by the constructor function of a derived class

Devuelve:
boolean sucess

Definición en la línea 41 del archivo MappingManager.php.

        {
                if (!is_string($psIdent) || 0 == strlen($psIdent)) {
                        trigger_error("invalid mapping identifier '$psIdent'");
                        return false;
                }
                if (!is_string($psType) || 0 == strlen($psType)) {
                        trigger_error("invalid mapping type '$psType'");
                        return false;
                }
                $a_new_map = array(
                         _TYPE                          => $psType
                        ,_INPUT                         => $psInput
                        ,_ACTION_FORWARDS       => array()
                        );

                $this->_aaMap[_ACTION_MAPPINGS][$psIdent] = $a_new_map;
                return true;
        }
_MergeMappings ( mappings)

Definición en la línea 129 del archivo MappingManager.php.

                                          {
                $mapmerge = array_merge($this->_aaMap[_ACTION_MAPPINGS],$mappings->_aaMap[_ACTION_MAPPINGS]);
                $this->_aaMap[_ACTION_MAPPINGS] = $mapmerge;
        }
_SetOptions ( psDefaultAction = 'ShowView',
psErrorHandler = 'handle_error',
piCache = 0,
piErrorReporting = -1 
)
Devuelve:
void

Definición en la línea 107 del archivo MappingManager.php.

        {
                if (!1 == $piCache) {
                        $piCache = 0;
                }
                if (-1 == $piErrorReporting) {
                        $piErrorReporting = E_USER_ERROR | E_USER_WARNING | E_USER_NOTICE;
                }

                $this->_aaOptions = array(
                                 _CACHE                         => $piCache
                                ,_ERROR_REPORTING       => $piErrorReporting
                                ,_ERROR_HANDLER         => $psErrorHandler
                                ,_DEFAULT_ACTION        => $psDefaultAction
                        );
        }
GetMappings ( )

retrieve mappings

Devuelve:
array

Definición en la línea 139 del archivo MappingManager.php.

        {
                return $this->_aaMap;
        }
GetOptions ( )

retrieve option

Devuelve:
array

Definición en la línea 149 del archivo MappingManager.php.

        {
                return $this->_aaOptions;
        }

constructor

Devuelve:
void

Definición en la línea 29 del archivo MappingManager.php.

        {
                trigger_error("MappingManager is a virtual class, please extend for your application");
                return false;
        }
secureFW ( )

Definición en la línea 154 del archivo MappingManager.php.

                                  {
                return $this->_secureFW;
        }

Documentación de los campos

$_aaMap
Valor inicial:
 array(
                 _ACTION_FORMS          => array()
                ,_ACTION_MAPPINGS       => array()
                )

Definición en la línea 13 del archivo MappingManager.php.

$_aaOptions = array()

Definición en la línea 21 del archivo MappingManager.php.

$_secureFW = array() [private]

Definición en la línea 23 del archivo MappingManager.php.


La documentación para esta clase fue generada a partir del siguiente fichero: