PHP Class Namshi\Cuzzle\Formatter\CurlFormatter

Mostra file Open project: namshi/cuzzle Class Usage Examples

Protected Properties

Property Type Description
$command string
$commandLineLength integer
$currentLineLength integer
$options string[]

Public Methods

Method Description
__construct ( integer $commandLineLength = 100 )
format ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : string
setCommandLineLength ( integer $commandLineLength )

Protected Methods

Method Description
addCommandPart ( $part )
addOption ( $name, null $value = null )
addOptionsToCommand ( )
extractArguments ( Psr\Http\Message\RequestInterface $request, array $options )
extractBodyArgument ( Psr\Http\Message\RequestInterface $request )
extractCookiesArgument ( Psr\Http\Message\RequestInterface $request, array $options )
extractHeadersArgument ( Psr\Http\Message\RequestInterface $request )
extractHttpMethodArgument ( Psr\Http\Message\RequestInterface $request )
extractUrlArgument ( Psr\Http\Message\RequestInterface $request )

Method Details

__construct() public method

public __construct ( integer $commandLineLength = 100 )
$commandLineLength integer

addCommandPart() protected method

protected addCommandPart ( $part )
$part

addOption() protected method

protected addOption ( $name, null $value = null )
$name
$value null

addOptionsToCommand() protected method

protected addOptionsToCommand ( )

extractArguments() protected method

protected extractArguments ( Psr\Http\Message\RequestInterface $request, array $options )
$request Psr\Http\Message\RequestInterface
$options array

extractBodyArgument() protected method

protected extractBodyArgument ( Psr\Http\Message\RequestInterface $request )
$request Psr\Http\Message\RequestInterface

extractCookiesArgument() protected method

protected extractCookiesArgument ( Psr\Http\Message\RequestInterface $request, array $options )
$request Psr\Http\Message\RequestInterface
$options array

extractHeadersArgument() protected method

protected extractHeadersArgument ( Psr\Http\Message\RequestInterface $request )
$request Psr\Http\Message\RequestInterface

extractHttpMethodArgument() protected method

protected extractHttpMethodArgument ( Psr\Http\Message\RequestInterface $request )
$request Psr\Http\Message\RequestInterface

extractUrlArgument() protected method

protected extractUrlArgument ( Psr\Http\Message\RequestInterface $request )
$request Psr\Http\Message\RequestInterface

format() public method

public format ( Psr\Http\Message\RequestInterface $request, array $options = [] ) : string
$request Psr\Http\Message\RequestInterface
$options array
return string

setCommandLineLength() public method

public setCommandLineLength ( integer $commandLineLength )
$commandLineLength integer

Property Details

$command protected_oe property

protected string $command
return string

$commandLineLength protected_oe property

protected int $commandLineLength
return integer

$currentLineLength protected_oe property

protected int $currentLineLength
return integer

$options protected_oe property

protected string[] $options
return string[]