Documentation

Command
in package

HTTP client curl command class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2024 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
5.2.0

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
string

clientToCommand()

Create a compatible command string to execute with the curl CLI application

public static clientToCommand(Client $client) : string
Parameters
$client : Client
Return values
string

commandToClient()

Create a client object from a command string from the Curl CLI application

public static commandToClient(string $command) : Client
Parameters
$command : string
Return values
Client

convertCommandOptions()

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
$options : array<string|int, mixed>
$curl : Curl
$request : Request
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
Return values
string

        
On this page

Search results