PHP Mini Documentation

helpers.php

Table of Contents

http_parse_query()  : array<string|int, mixed>
Parses http query string into an array
is_cli()  : bool
Is CLI?
out()  : mixed
Print output end exit
app()  : App
Get current app instance
config()  : mixed
Get or Set config
view()  : mixed
Load view file
load()  : LoaderInterface
Get app loader object
report()  : ErrorReportingInterface
Get app reporter object
router()  : RouterInterface
Get app router object
log_message()  : mixed
log_emergency()  : mixed
log_error()  : mixed
log_exception()  : mixed
log_info()  : mixed
log_debug()  : mixed
log_warning()  : mixed
run()  : Process
Run external command
run_async()  : Process
Run external command asynchronously
unit_convert()  : string
Convert to proper unit

Functions

http_parse_query()

Parses http query string into an array

http_parse_query(string $queryString[, string $argSeparator = '&' ][, int $decType = PHP_QUERY_RFC1738 ]) : array<string|int, mixed>
Parameters
$queryString : string

String to parse

$argSeparator : string = '&'

Query arguments separator

$decType : int = PHP_QUERY_RFC1738

Decoding type

Tags
author

Alxcube alxcube@gmail.com

Return values
array<string|int, mixed>

is_cli()

Is CLI?

is_cli() : bool

Test to see if a request was made from the command line.

Tags
Return values
bool

out()

Print output end exit

out([mixed $data = null ][, int $responseCode = 500 ]) : mixed
Parameters
$data : mixed = null
$responseCode : int = 500
Tags
Return values
mixed

app()

Get current app instance

app() : App
Tags
Return values
App

config()

Get or Set config

config(string $name[, mixed $value = null ]) : mixed
Parameters
$name : string
$value : mixed = null
Tags
Return values
mixed

view()

Load view file

view(string $path[, array<string|int, mixed> $params = [] ][, bool $return = false ]) : mixed
Parameters
$path : string
$params : array<string|int, mixed> = []
$return : bool = false

Print out view or return content

Tags
Return values
mixed

log_message()

log_message(string $level, mixed $message[, array<string|int, mixed> $context = [] ]) : mixed
Parameters
$level : string

@see \Psr\Log\LogLevel

$message : mixed
$context : array<string|int, mixed> = []
Tags
Return values
mixed

log_emergency()

log_emergency(mixed $message) : mixed
Parameters
$message : mixed
Tags
Return values
mixed

log_error()

log_error(mixed $message) : mixed
Parameters
$message : mixed
Tags
Return values
mixed

log_exception()

log_exception(Exception $exception) : mixed
Parameters
$exception : Exception
Tags
Return values
mixed

log_info()

log_info(mixed $message) : mixed
Parameters
$message : mixed
Tags
Return values
mixed

log_debug()

log_debug(mixed $message) : mixed
Parameters
$message : mixed
Tags
Return values
mixed

log_warning()

log_warning(mixed $message) : mixed
Parameters
$message : mixed
Tags
Return values
mixed

run()

Run external command

run(string $command, array<string|int, mixed> $params, OutputInterface $output[, int $timeout = 600 ][, bool $wait = true ]) : Process
Parameters
$command : string
$params : array<string|int, mixed>
$output : OutputInterface
$timeout : int = 600

Default = 600 seconds

$wait : bool = true

Default = true

Tags
Return values
Process

run_async()

Run external command asynchronously

run_async(string $command, array<string|int, mixed> $params, OutputInterface $output[, int $timeout = 600 ]) : Process
Parameters
$command : string
$params : array<string|int, mixed>
$output : OutputInterface
$timeout : int = 600

Default = 600 seconds

Tags
Return values
Process

unit_convert()

Convert to proper unit

unit_convert(int|float $size) : string
Parameters
$size : int|float
Tags
Return values
string

        

Search results