示例#1
0
文件: WS.php 项目: techart/tao
 /**
  */
 protected function current_uploads()
 {
     $files = array();
     foreach ($_FILES as $name => $file) {
         if (is_array($file['error'])) {
             $files[$name] = array_shift($file);
             foreach ($file as $v) {
                 $files[$name] = Core_Arrays::deep_merge_append($files[$name], $v);
             }
         } else {
             $files[$name] = array_values($file);
         }
     }
     $this->create_objects($files);
     return $files;
 }
示例#2
0
 public function test_deep_merge_append()
 {
     $arr1 = array("color" => array("favorite" => "red"), 5);
     $arr2 = array(10, "color" => array("favorite" => "green", "blue"));
     $this->assertEquals(Core_Arrays::deep_merge_append($arr1, $arr2), array('color' => array('favorite' => array('red', 'green'), 0 => 'blue'), 0 => array(5, 10)));
 }