10 defined(
'JPATH_PLATFORM') or die;
27 protected $decodedData = array();
38 public function __construct(array $source = null, array $options = array())
40 if (isset($options[
'filter']))
42 $this->filter = $options[
'filter'];
50 $this->data = & $_FILES;
53 $this->options = $options;
68 public function get($name, $default = null, $filter =
'cmd')
70 if (isset($this->data[$name]))
72 $results = $this->decodeData(
74 $this->data[$name][
'name'],
75 $this->data[$name][
'type'],
76 $this->data[$name][
'tmp_name'],
77 $this->data[$name][
'error'],
78 $this->data[$name][
'size']
98 protected function decodeData(array $data)
102 if (is_array($data[0]))
104 foreach ($data[0] as $k => $v)
106 $result[$k] = $this->decodeData(array($data[0][$k], $data[1][$k], $data[2][$k], $data[3][$k], $data[4][$k]));
111 return array(
'name' => $data[0],
'type' => $data[1],
'tmp_name' => $data[2],
'error' => $data[3],
'size' => $data[4]);
124 public function set($name, $value)