src/Http/Request.php
public function getFile($name)
    {
        if (!isset($this->files)) {
            $files = $this->getUploadedFiles();
            foreach ($files as $file) {
                $key = $file->getKey();
                if (isset($key)) {
                    $this->files[$key] = $file;
                } else {
                    $this->files[] = $file;
                }
            }
        }
        if (isset($this->files[$name])) {
            return $this->files[$name];
        } else {
            throw new \InvalidArgumentException("Upload file '$name' is empty");
        }
    }
public function getFile($name)
    {
        if (!isset($this->files)) {
            $files = $this->getUploadedFiles();
            foreach ($files as $file) {
                $key = $file->getKey();
                if (isset($key)) {
                    $this->files[$key] = $file;
                } else {
                    $this->files[] = $file;
                }
            }
        }
        if (isset($this->files[$name])) {
            return $this->files[$name];
        } else {
            throw new \InvalidArgumentException("Upload file '$name' is empty");
        }
    }
public function getFile ( $ name ) { if ( ! isset ( $ this -> files ) ) { $ files = $ this -> getUploadedFiles ( ) ; foreach ( $ files as $ file ) { $ key = $ file -> getKey ( ) ; if ( isset ( $ key ) ) { $ this -> files [ $ key ] = $ file ; } else { $ this -> files [ ] = $ file ; } } } if ( isset ( $ this -> files [ $ name ] ) ) { return $ this -> files [ $ name ] ; } else { throw new \ InvalidArgumentException ( "Upload file '$name' is empty" ) ; } }
Gets upload file object by name

@return Phalcon\Http\Request\File
Gets upload file object by name