/** * Constructor * * @param array An associative array of request data source names and * data arrays. * * @author David Zülke <*****@*****.**> * @since 0.11.0 */ public function __construct(array $data = array()) { $this->registerSource(self::SOURCE_COOKIES, $this->cookies); $this->registerSource(self::SOURCE_FILES, $this->files); $this->registerSource(self::SOURCE_HEADERS, $this->headers); // call the parent ctor which handles the actual loading of the data parent::__construct($data); // now fix the files array if necessary if ($this->files) { foreach (new RecursiveIteratorIterator(new RecursiveArrayIterator($this->files), RecursiveIteratorIterator::LEAVES_ONLY) as $leaf) { if (!$leaf instanceof AgaviUploadedFile) { $this->fixFilesArray(); } break; } } }
/** * Constructor * * @param array An associative array of request data source names and * data arrays. * * @author David Zülke <*****@*****.**> * @since 0.11.0 */ public function __construct(array $data = array()) { $this->registerSource(self::SOURCE_COOKIES, $this->cookies); $this->registerSource(self::SOURCE_FILES, $this->files); $this->registerSource(self::SOURCE_HEADERS, $this->headers); // call the parent ctor which handles the actual loading of the data parent::__construct($data); }