BASEPATH
public
mixed
BASEPATH
= \dirname(__DIR__, 1)
public
mixed
BASEPATH
= \dirname(__DIR__, 1)
public
mixed
BASEPATH
= \dirname(__DIR__, 1)
public
mixed
BASEPATH
= $applicationPath
public
mixed
BASEPATH
= dirname(__DIR__, 2)
public
mixed
PIONIA_BINARY
= 'pionia'
public
mixed
PIONIA_START
= \microtime(\true)
public
mixed
PIONIA_START
= \microtime(\true)
allBuiltins() : Arrayable
Call the given Closure with the given value then return the value.
tap(TValue $value[, callable(TValue): mixed|null $callback = null ]) : HighOrderTapProxy|TValue
Value returned is not transformed by the closure.
Get an item from an array using "dot" notation.
arr(array<string|int, mixed>|null $array) : Arrayable
Get an item from the environment. Or default if it does not exist.
env([string|null $key = null ][, mixed $default = null ]) : mixed
If both the key and the default value are null, the function should return the entire environment.
Adds a temporary key-value to the environment.
setEnv(string $key, mixed $value) : void
This can only be retrieved using the env
function.
Helper function to return a response
response([ $returnCode = 0 ][, string|null $returnMessage = null ][, mixed $returnData = null ][, mixed $extraData = null ]) : BaseResponse
int
Helper function to return the application instance
app() : PioniaApplication
Helper function to return the application container
container() : Container
Run any pionia-powered queries
db(string $tableName[, string|null $tableAlias = null ][, string|null $using = null ]) : Porm|null
The name of the table to connect to
Run any pionia-powered queries
table(string $tableName[, string|null $tableAlias = null ][, string|null $using = null ]) : Porm
The name of the table to connect to
The alias to use for the table provided
The connection to use
The porm instance for further chaining of queries
alias(mixed $key) : mixed
Get any directory from the application container
directoryFor(mixed $key) : mixed
This function returns a yes or no phrase based on the condition
yesNo(bool $condition[, string|null $yesPhrase = 'Yes' ][, string|null $noPhrase = 'No' ]) : string
The condition to check
The phrase to return if the condition is true
The phrase to return if the condition is false
convert a value to a boolean
asBool(mixed $value) : array<string|int, mixed>
Write an ini configuration file This writes to the file in a lock-safe manner
writeIniFile(string $file[, array<string|int, mixed> $array = [] ]) : bool
Get the logger instance from the application container
logger() : LoggerInterface
This function adds a new section to an ini file We generally use this to generate and add new sections to the generated.ini file which holds settings for the auto-generated files
addIniSection(string $section[, array<string|int, mixed>|null $keyValueToAppend = [] ][, string $iniFile = 'generated.ini' ]) : bool
This function will create the file if it does not exist, add the section if it does not exist or update the section if it exists
This function caches a response if the service has caching enabled.
cachedResponse(Service $instance, BaseResponse $response[, mixed $ttl = 60 ]) : BaseResponse
Cached key is of the format service_action
in camel case.
If no ttl is defined, caching will happen for only 60 seconds
The service we are currently in, just pass this
here!
The response object to cache, you can use response()
for this!
The time to live for the cache, defaults to 60 seconds
The cached response / the response you passed. It's not tampered with
Acronym for `cachedResponse` function but with more readable arguments
recached(Service $instance[, int|null $returnCode = 0 ][, string|null $returnMessage = null ][, mixed|null $returnData = null ][, mixed|null $extraData = null ][, mixed $ttl = 60 ]) : BaseResponse
The service we are currently in, just pass this
here
The return code for the response, defaults to 0
The return message for the response, defaults to null
The return data for the response, defaults to null
The extra data for the response, defaults to null
The time to live for the cache, defaults to 60 seconds
The cached response / the response you passed. It's not tampered with
Render a template file from the templates folder.
render( $file[, array<string|int, mixed>|null $data = [] ]) : void
Get all the builtins
parseHtml( $file[, array<string|int, mixed>|null $data = [] ]) : array<string|int, mixed>
Get the asset path
asset( $file[, string|null $dir = null ]) : string|null
Determine if the given value is "blank".
blank(mixed $value) : bool
Validate data
validate(string $field, Arrayable|Request|Service $data) : Validator
Convert a string to camel case
toCamelCase(string $value) : string
Convert a string to snake case
toSnakeCase(string $value) : string
Convert a string to a class name like format
classify(string $value) : string
Convert an array to a string
arrayToString(array<string|int, mixed> $value[, string|null $separator = ',' ]) : string
Convert a string to a slug-like format
slugify(string $value) : string
Convert a string to a singular form
singularize(string $word) : string
Convert a string to a plural form
pluralize(string $word) : string
Capitalize a string
capitalize(string $phrase) : string
Convert anything to a json string
jsonify(mixed $phrase) : string
Flatten an array
flatten(array<string|int, mixed> $flatten) : array<string|int, mixed>
is_cached_in(mixed $keyCached, mixed $keyToCheck) : bool