/** * Loads HTTP data. * @return void */ public function loadHttpData() { $path = $this->getHtmlName(); // img_x or img['x'] $path = explode('[', strtr(str_replace(']', '', strpos($path, '[') === FALSE ? $path . '.x' : substr($path, 0, -2)), '.', '_')); $this->setValue(Nette\ArrayTools::get($this->getForm()->getHttpData(), $path) !== NULL); }
/** * Loads HTTP data. * @return void */ public function loadHttpData() { $path = explode('[', strtr(str_replace(array('[]', ']'), '', $this->getHtmlName()), '.', '_')); $this->setValue(Nette\ArrayTools::get($this->getForm()->getHttpData(), $path)); }
/** * Returns uploaded file. * @param string key (or more keys) * @return HttpUploadedFile */ public final function getFile($key) { if ($this->files === NULL) { $this->initialize(); } $args = func_get_args(); return Nette\ArrayTools::get($this->files, $args); }
/** * Returns uploaded file. * @param string key (or more keys) * @return HttpUploadedFile */ final public function getFile($key) { $args = func_get_args(); return Nette\ArrayTools::get($this->files, $args); }