Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • CholeskyDecomposition
  • Dao
  • DateTime
  • DateTimeZone
  • DOMNode
  • EigenvalueDecomposition
  • Elemento
  • Historial
  • Irradiacion
  • Latitud
  • MotorPhp
  • Panel
  • PclZip
  • Periodo
  • PHPExcel
  • PHPExcel_Autoloader
  • PHPExcel_Best_Fit
  • PHPExcel_CachedObjectStorage_APC
  • PHPExcel_CachedObjectStorage_CacheBase
  • PHPExcel_CachedObjectStorage_DiscISAM
  • PHPExcel_CachedObjectStorage_Igbinary
  • PHPExcel_CachedObjectStorage_Memcache
  • PHPExcel_CachedObjectStorage_Memory
  • PHPExcel_CachedObjectStorage_MemoryGZip
  • PHPExcel_CachedObjectStorage_MemorySerialized
  • PHPExcel_CachedObjectStorage_PHPTemp
  • PHPExcel_CachedObjectStorage_SQLite
  • PHPExcel_CachedObjectStorage_SQLite3
  • PHPExcel_CachedObjectStorage_Wincache
  • PHPExcel_CachedObjectStorageFactory
  • PHPExcel_CalcEngine_CyclicReferenceStack
  • PHPExcel_CalcEngine_Logger
  • PHPExcel_Calculation
  • PHPExcel_Calculation_Database
  • PHPExcel_Calculation_DateTime
  • PHPExcel_Calculation_Engineering
  • PHPExcel_Calculation_ExceptionHandler
  • PHPExcel_Calculation_Financial
  • PHPExcel_Calculation_FormulaParser
  • PHPExcel_Calculation_FormulaToken
  • PHPExcel_Calculation_Function
  • PHPExcel_Calculation_Functions
  • PHPExcel_Calculation_Logical
  • PHPExcel_Calculation_LookupRef
  • PHPExcel_Calculation_MathTrig
  • PHPExcel_Calculation_Statistical
  • PHPExcel_Calculation_TextData
  • PHPExcel_Calculation_Token_Stack
  • PHPExcel_Cell
  • PHPExcel_Cell_AdvancedValueBinder
  • PHPExcel_Cell_DataType
  • PHPExcel_Cell_DataValidation
  • PHPExcel_Cell_DefaultValueBinder
  • PHPExcel_Cell_Hyperlink
  • PHPExcel_Chart
  • PHPExcel_Chart_DataSeries
  • PHPExcel_Chart_DataSeriesValues
  • PHPExcel_Chart_Layout
  • PHPExcel_Chart_Legend
  • PHPExcel_Chart_PlotArea
  • PHPExcel_Chart_Renderer_jpgraph
  • PHPExcel_Chart_Title
  • PHPExcel_Comment
  • PHPExcel_DocumentProperties
  • PHPExcel_DocumentSecurity
  • PHPExcel_Exponential_Best_Fit
  • PHPExcel_HashTable
  • PHPExcel_IOFactory
  • PHPExcel_Linear_Best_Fit
  • PHPExcel_Logarithmic_Best_Fit
  • PHPExcel_NamedRange
  • PHPExcel_Polynomial_Best_Fit
  • PHPExcel_Power_Best_Fit
  • PHPExcel_Reader_Abstract
  • PHPExcel_Reader_CSV
  • PHPExcel_Reader_DefaultReadFilter
  • PHPExcel_Reader_Excel2003XML
  • PHPExcel_Reader_Excel2007
  • PHPExcel_Reader_Excel2007_Chart
  • PHPExcel_Reader_Excel2007_Theme
  • PHPExcel_Reader_Excel5
  • PHPExcel_Reader_Excel5_Escher
  • PHPExcel_Reader_Excel5_MD5
  • PHPExcel_Reader_Excel5_RC4
  • PHPExcel_Reader_Gnumeric
  • PHPExcel_Reader_HTML
  • PHPExcel_Reader_OOCalc
  • PHPExcel_Reader_SYLK
  • PHPExcel_ReferenceHelper
  • PHPExcel_RichText
  • PHPExcel_RichText_Run
  • PHPExcel_RichText_TextElement
  • PHPExcel_Settings
  • PHPExcel_Shared_CodePage
  • PHPExcel_Shared_Date
  • PHPExcel_Shared_Drawing
  • PHPExcel_Shared_Escher
  • PHPExcel_Shared_Escher_DgContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer
  • PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer
  • PHPExcel_Shared_Escher_DggContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE
  • PHPExcel_Shared_Escher_DggContainer_BstoreContainer_BSE_Blip
  • PHPExcel_Shared_Excel5
  • PHPExcel_Shared_File
  • PHPExcel_Shared_Font
  • PHPExcel_Shared_JAMA_LUDecomposition
  • PHPExcel_Shared_JAMA_Matrix
  • PHPExcel_Shared_JAMA_QRDecomposition
  • PHPExcel_Shared_OLE
  • PHPExcel_Shared_OLE_ChainedBlockStream
  • PHPExcel_Shared_OLE_PPS
  • PHPExcel_Shared_OLE_PPS_File
  • PHPExcel_Shared_OLE_PPS_Root
  • PHPExcel_Shared_OLERead
  • PHPExcel_Shared_PasswordHasher
  • PHPExcel_Shared_String
  • PHPExcel_Shared_TimeZone
  • PHPExcel_Shared_XMLWriter
  • PHPExcel_Shared_ZipArchive
  • PHPExcel_Shared_ZipStreamWrapper
  • PHPExcel_Style
  • PHPExcel_Style_Alignment
  • PHPExcel_Style_Border
  • PHPExcel_Style_Borders
  • PHPExcel_Style_Color
  • PHPExcel_Style_Conditional
  • PHPExcel_Style_Fill
  • PHPExcel_Style_Font
  • PHPExcel_Style_NumberFormat
  • PHPExcel_Style_Protection
  • PHPExcel_Style_Supervisor
  • PHPExcel_Worksheet
  • PHPExcel_Worksheet_AutoFilter
  • PHPExcel_Worksheet_AutoFilter_Column
  • PHPExcel_Worksheet_AutoFilter_Column_Rule
  • PHPExcel_Worksheet_BaseDrawing
  • PHPExcel_Worksheet_CellIterator
  • PHPExcel_Worksheet_ColumnDimension
  • PHPExcel_Worksheet_Drawing
  • PHPExcel_Worksheet_Drawing_Shadow
  • PHPExcel_Worksheet_HeaderFooter
  • PHPExcel_Worksheet_HeaderFooterDrawing
  • PHPExcel_Worksheet_MemoryDrawing
  • PHPExcel_Worksheet_PageMargins
  • PHPExcel_Worksheet_PageSetup
  • PHPExcel_Worksheet_Protection
  • PHPExcel_Worksheet_Row
  • PHPExcel_Worksheet_RowDimension
  • PHPExcel_Worksheet_RowIterator
  • PHPExcel_Worksheet_SheetView
  • PHPExcel_WorksheetIterator
  • PHPExcel_Writer_Abstract
  • PHPExcel_Writer_CSV
  • PHPExcel_Writer_Excel2007
  • PHPExcel_Writer_Excel2007_Chart
  • PHPExcel_Writer_Excel2007_Comments
  • PHPExcel_Writer_Excel2007_ContentTypes
  • PHPExcel_Writer_Excel2007_DocProps
  • PHPExcel_Writer_Excel2007_Drawing
  • PHPExcel_Writer_Excel2007_Rels
  • PHPExcel_Writer_Excel2007_RelsRibbon
  • PHPExcel_Writer_Excel2007_RelsVBA
  • PHPExcel_Writer_Excel2007_StringTable
  • PHPExcel_Writer_Excel2007_Style
  • PHPExcel_Writer_Excel2007_Theme
  • PHPExcel_Writer_Excel2007_Workbook
  • PHPExcel_Writer_Excel2007_Worksheet
  • PHPExcel_Writer_Excel2007_WriterPart
  • PHPExcel_Writer_Excel5
  • PHPExcel_Writer_Excel5_BIFFwriter
  • PHPExcel_Writer_Excel5_Escher
  • PHPExcel_Writer_Excel5_Font
  • PHPExcel_Writer_Excel5_Parser
  • PHPExcel_Writer_Excel5_Workbook
  • PHPExcel_Writer_Excel5_Worksheet
  • PHPExcel_Writer_Excel5_Xf
  • PHPExcel_Writer_HTML
  • PHPExcel_Writer_PDF
  • PHPExcel_Writer_PDF_Core
  • PHPExcel_Writer_PDF_DomPDF
  • PHPExcel_Writer_PDF_mPDF
  • PHPExcel_Writer_PDF_tcPDF
  • Provincia
  • Radiacion
  • SingularValueDecomposition
  • Sistema
  • trendClass
  • xajax
  • xajaxArgumentManager
  • xajaxCallableObject
  • xajaxCallableObjectPlugin
  • xajaxControl
  • xajaxControlContainer
  • xajaxCustomRequest
  • xajaxCustomResponse
  • xajaxEvent
  • xajaxEventPlugin
  • xajaxFunctionPlugin
  • xajaxIncludeClientScriptPlugin
  • xajaxLanguageManager
  • xajaxPlugin
  • xajaxPluginManager
  • xajaxRequest
  • xajaxRequestPlugin
  • xajaxResponse
  • xajaxResponseManager
  • xajaxResponsePlugin
  • xajaxScriptPlugin
  • xajaxUserFunction
  • XMLWriter

Interfaces

  • DateTimeInterface
  • Iterator
  • PHPExcel_CachedObjectStorage_ICache
  • PHPExcel_Cell_IValueBinder
  • PHPExcel_IComparable
  • PHPExcel_Reader_IReader
  • PHPExcel_Reader_IReadFilter
  • PHPExcel_RichText_ITextElement
  • PHPExcel_Writer_IWriter
  • Throwable
  • Traversable

Exceptions

  • Exception
  • PHPExcel_Calculation_Exception
  • PHPExcel_Chart_Exception
  • PHPExcel_Exception
  • PHPExcel_Reader_Exception
  • PHPExcel_Writer_Exception

Functions

  • acosh
  • agregar_elemento
  • asinh
  • atanh
  • borrar_elementos
  • borrar_gdm_ab
  • borrar_irradiacion
  • borrar_latitud
  • borrar_panel
  • borrar_periodo
  • borrar_pmp_min_pmp_max
  • borrar_radiacion
  • borrar_resumen
  • borrar_sistema
  • borrar_sombra
  • gdm_ab
  • grabar_resumen
  • historial
  • hypo
  • irradiacion
  • JAMAError
  • latitud
  • limpiar_historial
  • login
  • mb_str_replace
  • mostrar_energia_total_ch
  • mostrar_panel_md_th
  • mostrar_panel_th
  • mostrar_radiacion_md_th
  • mostrar_radiacion_th
  • mostrar_resumen_th
  • panel
  • PclZipUtilCopyBlock
  • PclZipUtilOptionText
  • PclZipUtilPathInclusion
  • PclZipUtilPathReduction
  • PclZipUtilRename
  • PclZipUtilTranslateWinPath
  • periodo
  • pmp_min_pmp_max
  • preparar_panel
  • preparar_radiacion
  • preparar_radiacion_media
  • radiacion
  • resumen
  • sistema
  • sombra
  • xajaxCompressFile
  • xajaxErrorHandler
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download
  1: <?php
  2: /*
  3:     File: xajaxArgumentManager.inc.php
  4: 
  5:     Contains the xajaxArgumentManager class
  6: 
  7:     Title: xajaxArgumentManager class
  8: 
  9:     Please see <copyright.inc.php> for a detailed description, copyright
 10:     and license information.
 11: */
 12: 
 13: /*
 14:     @package xajax
 15:     @version $Id: xajaxArgumentManager.inc.php 362 2007-05-29 15:32:24Z calltoconstruct $
 16:     @copyright Copyright (c) 2005-2007 by Jared White & J. Max Wilson
 17:     @copyright Copyright (c) 2008-2010 by Joseph Woolley, Steffen Konerow, Jared White  & J. Max Wilson
 18:     @license http://www.xajaxproject.org/bsd_license.txt BSD License
 19: */
 20: 
 21: if (!defined('XAJAX_METHOD_UNKNOWN')) define('XAJAX_METHOD_UNKNOWN', 0);
 22: if (!defined('XAJAX_METHOD_GET')) define('XAJAX_METHOD_GET', 1);
 23: if (!defined('XAJAX_METHOD_POST')) define('XAJAX_METHOD_POST', 2);
 24: 
 25: /*
 26:     Class: xajaxArgumentManager
 27:     
 28:     This class processes the input arguments from the GET or POST data of 
 29:     the request.  If this is a request for the initial page load, no arguments
 30:     will be processed.  During a xajax request, any arguments found in the
 31:     GET or POST will be converted to a PHP array.
 32: */
 33: final class xajaxArgumentManager
 34: {
 35:     /*
 36:         Array: aArgs
 37:         
 38:         An array of arguments received via the GET or POST parameter
 39:         xjxargs.
 40:     */
 41:     private $aArgs;
 42:     
 43:     /*
 44:         Boolean: bDecodeUTF8Input
 45:         
 46:         A configuration option used to indicate whether input data should be
 47:         UTF8 decoded automatically.
 48:     */
 49:     private $bDecodeUTF8Input;
 50:     
 51:     /*
 52:         String: sCharacterEncoding
 53:         
 54:         The character encoding in which the input data will be received.
 55:     */
 56:     private $sCharacterEncoding;
 57:     
 58:     /*
 59:         Integer: nMethod
 60:         
 61:         Stores the method that was used to send the arguments from the client.  Will
 62:         be one of: XAJAX_METHOD_UNKNOWN, XAJAX_METHOD_GET, XAJAX_METHOD_POST
 63:     */
 64:     private $nMethod;
 65:     
 66:     /*
 67:         Array: aSequence
 68:         
 69:         Stores the decoding sequence table.
 70:     */
 71:     private $aSequence;
 72:     
 73:     /*
 74:         Function: __convertStringToBool
 75:         
 76:         Converts a string to a bool var.
 77:         
 78:         Parameters:
 79:             $sValue - (string): 
 80:                 
 81:         Returns:
 82:             (bool) : true / false
 83:     
 84:     */
 85:     
 86:     private function __convertStringToBool($sValue)
 87:     {
 88:         if (0 == strcasecmp($sValue, 'true'))
 89:             return true;
 90:         if (0 == strcasecmp($sValue, 'false'))
 91:             return false;
 92:         if (is_numeric($sValue))
 93:         {
 94:             if (0 == $sValue)
 95:                 return false;
 96:             return true;
 97:         }
 98:         return false;
 99:     }
100:     
101:     private function __argumentStripSlashes($sArg)
102:     {
103:         if (false == is_string($sArg))
104:             return;
105:         
106:         $sArg = stripslashes($sArg);
107:     }
108:     
109:     private function __convertValue($value)
110:     {
111:         $cType = substr($value, 0, 1);
112:         $sValue = substr($value, 1);
113:         switch ($cType) {
114:             case 'S': $value = false === $sValue ? '' : $sValue;  break;
115:             case 'B': $value = $this->__convertStringToBool($sValue); break;
116:             case 'N': $value = $sValue == floor($sValue) ? (int)$sValue : (float)$sValue; break;
117:             case '*': $value = null; break;
118:         }
119:         return $value;
120:     }
121: 
122:     private function __decodeXML($xml)
123:     {
124:         $return = array();
125:         $nodes = $xml->e;
126:         foreach ($nodes as $node) {
127:             $key = (string) $node->k;
128:             if (isset($node->v->xjxobj)) {
129:                 $value = $this->__decodeXML($node->v->xjxobj);
130:             } else {
131:                 $value = $this->__convertValue( (string) $node->v );
132:             }
133:             $return[$key] = $value;
134:         }
135:     
136:         return $return;
137:     }
138: 
139: 
140:     private function __argumentDecode( &$sArg )
141:     {
142: 
143:         if ('' ==  $sArg ) return;
144: 
145:         $data = json_decode( $sArg , true );
146:         if ( null !== $data ) {
147:             $sArg = $data;
148:         } else  {
149:             $sArg = $this->__convertValue( $sArg );
150:         }
151:     }
152: 
153:     private function __argumentDecodeUTF8_iconv( &$mArg )
154:     {
155: 
156: 
157:         if ( is_array( $mArg ) )
158:         {
159:             foreach ( array_keys( $mArg ) as $sKey )
160:             {
161:                 $sNewKey = $sKey;
162:                 $this->__argumentDecodeUTF8_iconv($sNewKey);
163:                 
164:                 if ($sNewKey != $sKey)
165:                 {
166:                     $mArg[$sNewKey] = $mArg[$sKey];
167:                     unset($mArg[$sKey]);
168:                     $sKey = $sNewKey;
169:                 }
170:                 
171:                 $this->__argumentDecodeUTF8_iconv($mArg[$sKey]);
172:             }
173:         }
174:         else if (is_string($mArg))
175:             $mArg = iconv("UTF-8", $this->sCharacterEncoding.'//TRANSLIT', $mArg);
176:     }
177:     
178:     private function __argumentDecodeUTF8_mb_convert_encoding(&$mArg)
179:     {
180:         if (is_array($mArg))
181:         {
182:             foreach (array_keys($mArg) as $sKey)
183:             {
184:                 $sNewKey = $sKey;
185:                 $this->__argumentDecodeUTF8_mb_convert_encoding($sNewKey);
186:                 
187:                 if ($sNewKey != $sKey)
188:                 {
189:                     $mArg[$sNewKey] = $mArg[$sKey];
190:                     unset($mArg[$sKey]);
191:                     $sKey = $sNewKey;
192:                 }
193:                 
194:                 $this->__argumentDecodeUTF8_mb_convert_encoding($mArg[$sKey]);
195:             }
196:         }
197:         else if (is_string($mArg))
198:             $mArg = mb_convert_encoding($mArg, $this->sCharacterEncoding, "UTF-8");
199:     }
200:     
201:     private function __argumentDecodeUTF8_utf8_decode(&$mArg)
202:     {
203:         if (is_array($mArg))
204:         {
205:             foreach (array_keys($mArg) as $sKey)
206:             {
207:                 $sNewKey = $sKey;
208:                 $this->__argumentDecodeUTF8_utf8_decode($sNewKey);
209:                 
210:                 if ($sNewKey != $sKey)
211:                 {
212:                     $mArg[$sNewKey] = $mArg[$sKey];
213:                     unset($mArg[$sKey]);
214:                     $sKey = $sNewKey;
215:                 }
216:                 
217:                 $this->__argumentDecodeUTF8_utf8_decode($mArg[$sKey]);
218:             }
219:         }
220:         else if (is_string($mArg))
221:             $mArg = utf8_decode($mArg);
222:     }
223:     
224:     /*
225:         Constructor: xajaxArgumentManager
226:         
227:         Initializes configuration settings to their default values and reads
228:         the argument data from the GET or POST data.
229:     */
230:     private function __construct()
231:     {
232:         $this->aArgs = array();
233:         $this->bDecodeUTF8Input = false;
234:         $this->sCharacterEncoding = 'UTF-8';
235:         $this->nMethod = XAJAX_METHOD_UNKNOWN;
236:         
237:         if (isset($_POST['xjxargs'])) {
238:             $this->nMethod = XAJAX_METHOD_POST;
239:             $this->aArgs = $_POST['xjxargs'];
240:         } else if (isset($_GET['xjxargs'])) {
241:             $this->nMethod = XAJAX_METHOD_GET;
242:             $this->aArgs = $_GET['xjxargs'];
243:         }
244:         if (1 == get_magic_quotes_gpc())
245:             array_walk($this->aArgs, array(&$this, '__argumentStripSlashes'));
246: 
247:         array_walk($this->aArgs, array(&$this, '__argumentDecode'));
248:     }
249:     
250:     /*
251:         Function: getInstance
252:         
253:         Returns:
254:         
255:         object - A reference to an instance of this class.  This function is
256:             used to implement the singleton pattern.
257:     */
258:     public static function &getInstance()
259:     {
260:         static $obj;
261:         if (!$obj) {
262:             $obj = new xajaxArgumentManager();
263:         }
264:         return $obj;
265:     }
266:     
267:     /*
268:         Function: configure
269:         
270:         Accepts configuration settings from the main <xajax> object.
271:         
272:         Parameters:
273:         
274:         
275:         The <xajaxArgumentManager> tracks the following configuration settings:
276:         
277:             <decodeUTF8Input> - (boolean): See <xajaxArgumentManager->bDecodeUTF8Input>
278:             <characterEncoding> - (string): See <xajaxArgumentManager->sCharacterEncoding>
279:     */
280:     public function configure($sName, $mValue)
281:     {
282:         if ('decodeUTF8Input' == $sName) {
283:             if (true === $mValue || false === $mValue)
284:                 $this->bDecodeUTF8Input = $mValue;
285:         } else if ('characterEncoding' == $sName) {
286:             $this->sCharacterEncoding = $mValue;
287:         }
288:     }
289:     
290:     /*
291:         Function: getRequestMethod
292:         
293:         Returns the method that was used to send the arguments from the client.
294:     */
295:     public function getRequestMethod()
296:     {
297:         return $this->nMethod;
298:     }
299:     
300:     /*
301:         Function: process
302:         
303:         Returns the array of arguments that were extracted and parsed from 
304:         the GET or POST data.
305:     */
306:     public function process()
307:     {
308:         if ($this->bDecodeUTF8Input)
309:         {
310: 
311:             $sFunction = '';
312:             
313:             if (function_exists('iconv'))
314:                 $sFunction = "iconv";
315:             else if (function_exists('mb_convert_encoding'))
316:                 $sFunction = "mb_convert_encoding";
317:             else if ($this->sCharacterEncoding == "ISO-8859-1")
318:                 $sFunction = "utf8_decode";
319:             else {
320:                 $objLanguageManager = xajaxLanguageManager::getInstance();
321:                 trigger_error(
322:                     $objLanguageManager->getText('ARGMGR:ERR:03')
323:                     , E_USER_NOTICE
324:                     );
325:             }
326:             
327:             $mFunction = array(&$this, '__argumentDecodeUTF8_' . $sFunction);
328:             
329:             array_walk($this->aArgs, $mFunction);
330:             $this->bDecodeUTF8Input = false;
331:         }
332:         
333:         return $this->aArgs;
334:     }
335: }
336: 
Autene API documentation generated by ApiGen