public function useName($name)
    {
        if (empty($name)) {
            throw new \Exception('Given name is empty!');
        }

        if (!isset($_FILES[$name])) {
            throw new \Exception('Given name not exists in $_FILES var!');
        }

        $this->data = $_FILES[$name];

        return $this;
    }
public function useName($name)
    {
        if (empty($name)) {
            throw new \Exception('Given name is empty!');
        }

        if (!isset($_FILES[$name])) {
            throw new \Exception('Given name not exists in $_FILES var!');
        }

        $this->data = $_FILES[$name];

        return $this;
    }
public function useName ( $ name ) { if ( empty ( $ name ) ) { throw new \ Exception ( 'Given name is empty!' ) ; } if ( ! isset ( $ _FILES [ $ name ] ) ) { throw new \ Exception ( 'Given name not exists in $_FILES var!' ) ; } $ this -> data = $ _FILES [ $ name ] ; return $ this ; }
Use name as default in File's methods.

@param  string $name
@return self
@throws \Exception
Use name as default in File s methods .