Utils

Methods

escape_params

Function to parse an array of given parameters.

Utils::escape_params(array $params, int $flags = 4) : string

Parameters

@param array $params Array of strings.

@param int $flags One or multiple OR-ed together of the following:

Returns string

string

pos_or_range

Function to "convert" int or array to a pos or range argument

Utils::pos_or_range( $p) : mixed

Parameters

@param int|array $p

Returns mixed

int|string

parse_error

Function to parse an MPD error string to an array

Utils::parse_error(string $error) : FloFaber\MphpD\MPDException

Parameters

@param string $error The error string. For example "ACK [error@command_listNum] {current_command} message_text"

Returns FloFaber\MphpD\MPDException

\MPDException

© 2023 Florian Faber