public function getFile($name = null, $index = 0, $default = false)
    {
        $files = $this->getFiles($name);

        if (isset($files[$index])) {
            return $files[$index];
        } else {
            return $default;
        }
    }
public function getFile($name = null, $index = 0, $default = false)
    {
        $files = $this->getFiles($name);

        if (isset($files[$index])) {
            return $files[$index];
        } else {
            return $default;
        }
    }
public function getFile ( $ name = null , $ index = 0 , $ default = false ) { $ files = $ this -> getFiles ( $ name ) ; if ( isset ( $ files [ $ index ] ) ) { return $ files [ $ index ] ; } else { return $ default ; } }
Returns a single file bag from uploaded collection

@param string $name Optional field name
@param string $index File key index. 0 - means return first
@param mixed $default Default value to be returned in case $index doesn't exist
@return array
Returns a single file bag from uploaded collection