Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

  • AbstractMessage
  • EntityEnclosingRequest
  • Header
  • PostFile
  • Request
  • RequestFactory
  • Response

Interfaces

  • EntityEnclosingRequestInterface
  • MessageInterface
  • PostFileInterface
  • RequestFactoryInterface
  • RequestInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class PostFile

POST file upload

Guzzle\Http\Message\PostFile implements Guzzle\Http\Message\PostFileInterface
Namespace: Guzzle\Http\Message
Located at src/Guzzle/Http/Message/PostFile.php
Methods summary
public
# __construct( string $fieldName, string $filename, string $contentType = null, string $postname = null )

Parameters

$fieldName
Name of the field
$filename
Local path to the file
$contentType
$postname Remote post file name
$postname
$contentType Content-Type of the upload
public Guzzle\Http\Message\PostFile
# setFieldName( string $name )

Set the name of the field

Set the name of the field

Parameters

$name
Field name

Returns

Guzzle\Http\Message\PostFile

Implementation of

Guzzle\Http\Message\PostFileInterface::setFieldName()
public string
# getFieldName( )

Get the name of the field

Get the name of the field

Returns

string

Implementation of

Guzzle\Http\Message\PostFileInterface::getFieldName()
public Guzzle\Http\Message\PostFile
# setFilename( string $filename )

Set the path to the file

Set the path to the file

Parameters

$filename
$path Full path to the file

Returns

Guzzle\Http\Message\PostFile

Throws

InvalidArgumentException
if the file cannot be read

Implementation of

Guzzle\Http\Message\PostFileInterface::setFilename()
public Guzzle\Http\Message\PostFile
# setPostname( string $postname )

Set the post name of the file

Set the post name of the file

Parameters

$postname
$name The new name of the file

Returns

Guzzle\Http\Message\PostFile

Implementation of

Guzzle\Http\Message\PostFileInterface::setPostname()
public string
# getFilename( )

Get the full path to the file

Get the full path to the file

Returns

string

Implementation of

Guzzle\Http\Message\PostFileInterface::getFilename()
public string
# getPostname( )

Get the post name of the file

Get the post name of the file

Returns

string

Implementation of

Guzzle\Http\Message\PostFileInterface::getPostname()
public Guzzle\Http\Message\PostFile
# setContentType( string $type )

Set the Content-Type of the file

Set the Content-Type of the file

Parameters

$type
Content type

Returns

Guzzle\Http\Message\PostFile

Implementation of

Guzzle\Http\Message\PostFileInterface::setContentType()
public string
# getContentType( )

Get the Content-Type of the file

Get the Content-Type of the file

Returns

string

Implementation of

Guzzle\Http\Message\PostFileInterface::getContentType()
public string
# getCurlValue( )

Get a cURL ready string or CurlFile object for the upload

Get a cURL ready string or CurlFile object for the upload

Returns

string

Implementation of

Guzzle\Http\Message\PostFileInterface::getCurlValue()
public
# getCurlString( )

Deprecated

Codecoverageignore

protected
# guessContentType( )

Determine the Content-Type of the file

Determine the Content-Type of the file

Properties summary
protected $fieldName
#
protected $contentType
#
protected $filename
#
protected $postname
#
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen