Command
in package
HTTP client curl command class
Tags
Table of Contents
Methods
- addQuotes() : string
- Trim quotes from value
- clientToCommand() : string
- Create a compatible command string to execute with the curl CLI application
- commandToClient() : Client
- Create a client object from a command string from the Curl CLI application
- convertCommandOptions() : array<string|int, mixed>
- Convert CLI options to usable values for the Curl handler and request
- extractCommandOptionValues() : array<string|int, mixed>
- Extract command option values
- parseCommandOptions() : array<string|int, mixed>
- Parse the CLI command options string
- trimQuotes() : string
- Trim quotes from value
Methods
addQuotes()
Trim quotes from value
public
static addQuotes(string $value[, string $quote = '"' ]) : string
Parameters
- $value : string
- $quote : string = '"'
Return values
stringclientToCommand()
Create a compatible command string to execute with the curl CLI application
public
static clientToCommand(Client $client) : string
Parameters
- $client : Client
Return values
stringcommandToClient()
Create a client object from a command string from the Curl CLI application
public
static commandToClient(string $command) : Client
Parameters
- $command : string
Return values
ClientconvertCommandOptions()
Convert CLI options to usable values for the Curl handler and request
public
static convertCommandOptions(array<string|int, mixed> $options, Curl $curl, Request $request) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed>extractCommandOptionValues()
Extract command option values
public
static extractCommandOptionValues(array<string|int, mixed> $options) : array<string|int, mixed>
Parameters
- $options : array<string|int, mixed>
Return values
array<string|int, mixed>parseCommandOptions()
Parse the CLI command options string
public
static parseCommandOptions(string $optionString) : array<string|int, mixed>
Parameters
- $optionString : string
Return values
array<string|int, mixed>trimQuotes()
Trim quotes from value
public
static trimQuotes(string $value) : string
Parameters
- $value : string