Example #1
0
 /**
  * The rekursive handler of list
  * 
  * @param array $list an array of PC_Variables to assign; may contain sub-arrays; contains null
  * 	if an element should be ignored
  * @param PC_Obj_MultiType $expr the array to take the elements from
  */
 private function handle_list_rek($list, $expr)
 {
     $array = $expr->get_array();
     $lcount = count($list);
     for ($i = 0; $i < $lcount; $i++) {
         if ($list[$i] === null) {
             continue;
         }
         $el = isset($array[$i]) ? $array[$i] : $this->create_unknown();
         if (is_array($list[$i])) {
             $this->handle_list_rek($list[$i], $el);
         } else {
             $this->set_var($list[$i], $el);
         }
     }
 }