Esempio n. 1
0
 public function addData($dataAX, $valueAX = null)
 {
     if (is_null(self::$mainJavaScriptCodeCStr)) {
         self::$mainJavaScriptCodeCStr = "";
     }
     if (is_null(self::$mainHtmlCodeCStr)) {
         self::$mainHtmlCodeCStr = "";
     }
     if (is_null($this->dataCArr)) {
         $this->dataCArr = array();
     }
     if (is_string($dataAX) && !is_null($valueAX)) {
         $pointerLPtr =& $this->dataCArr;
         $dataAX = explode('.', $dataAX);
         //$dataAX = array_reverse ( $dataAX );
         foreach ($dataAX as $dataKeyLUInt => $dataValueLStr) {
             if ($dataKeyLUInt == 0 && count($dataAX) == 1) {
                 $pointerLPtr[$dataAX[$dataKeyLUInt]] = $valueAX;
             } else {
                 if (count($dataAX) - 1 == $dataKeyLUInt) {
                     $pointerLPtr[$dataAX[$dataKeyLUInt]] = $valueAX;
                 } else {
                     if (!isset($pointerLPtr[$dataAX[$dataKeyLUInt]])) {
                         $pointerLPtr[$dataAX[$dataKeyLUInt]] = array();
                     }
                     $pointerLPtr =& $pointerLPtr[$dataAX[$dataKeyLUInt]];
                 }
             }
         }
     } else {
         if (is_array($dataAX) && is_null($valueAX)) {
             $this->dataCArr = array_merge_recursive($this->dataCArr, $dataAX);
         }
     }
 }