Application
Table of Contents
Interfaces
Classes
- Aeros
- This class works together with Aeros REPL.
- Cache
- This is a wrapper class for Predis package.
- Cluster
- Component
- Core class Component renders and resuses small portions of HTML that could be embedded or returned for after rendering.
- Config
- Controller
- Cookie
- Cron
- Schedules execution of jobs at specified intervals
- Db
- Wrapper class for PDO library.
- Encryptor
- Event
- File
- Job
- Kernel
- Logger
- Model
- Base class for models.
- Network
- Observable
- Pipeline
- Queue
- Redirect
- Request
- Request class handles incoming requests and makes outgoing requests.
- Response
- Route
- Router class manages static calls to HTTP methods, parses the registered routes and parses the current requested URI.
- Router
- Router class manages static calls to HTTP methods, parses the registered routes and parses the current requested URI.
- Security
- ServiceContainer
- ServiceProvider
- Session
- Token
- Tracking
- View
- Worker
Traits
Functions
- app() : ServiceContainer
- Bootstraps the application.
- scan() : array<string|int, mixed>
- Scans a dir for files with specific extensions.
- view() : mixed
- View function is a wrapper for the View class which renders/makes and returns HTML content to the browser.
- response() : mixed
- Response function is a wrapper for Response class and formats and returns content as JSON, XML or any other content type.
- request() : mixed
- Makes HTML requests with cURL PHP built-in function, also, grabs values, params, from a specific HTTP method.
- redirect() : void
- Redirect function is a wrapper for Redirect class and performs a redirect with arguments.
- dd() : void
- Dump and die for testing purposes.
- cache() : Cache
- cache() function is a Predis wrapper.
- component() : mixed
- Component function is a wrapper for the Component class which renders and returns HTML content to the browser.
- env() : mixed
- Gets an ENV variable if exists, otherwise, if $default is not null, sets the new value.
- setCookieWith() : bool
- Creates a cookie with mixed values (callables are not supported).
- deleteCookie() : bool
- Deletes a cookie by $key.
- cookie() : mixed
- Returns the main cookie or a specific one.
- sanitizeWith() : mixed
- Sanitizes a value by reference.
- db() : Db
- Wrapper for DB conection and all its handlers.
- csrf() : string
- Embeds a CSRF token into a hidden input.
- worker() : Worker
- Returns the main app worker.
- encryptor() : Encryptor
- Returns the global encryptor.
- session() : Session
- Returns the global session object.
- config() : mixed
- Returns values or objects from config files.
- logger() : bool
- Appends a message into a log file.
- queue() : Queue
- Returns the queue instance.
- cron() : Cron
- Returns an instance of Cron.
- isInternal() : bool
- Validates if the current user is internal.
- str_find() : bool
- Searches for a string within another string based on a list and returns true if one of the items from the list was found.
- pluralize() : string
- Pluralizes a word.
- singularize() : string
- Singularizes a word.
Functions
app()
Bootstraps the application.
app() : ServiceContainer
Tags
Return values
ServiceContainerscan()
Scans a dir for files with specific extensions.
scan(string $path[, mixed $extensions = ['php'] ]) : array<string|int, mixed>
Parameters
- $path : string
- $extensions : mixed = ['php']
Tags
Return values
array<string|int, mixed>view()
View function is a wrapper for the View class which renders/makes and returns HTML content to the browser.
view(string $view[, array<string|int, mixed> $values = [] ][, string $subfolder = '' ]) : mixed
Parameters
- $view : string
- $values : array<string|int, mixed> = []
- $subfolder : string = ''
response()
Response function is a wrapper for Response class and formats and returns content as JSON, XML or any other content type.
response([mixed $data = '' ][, int $code = 200 ][, string $type = AerosLibClassesResponse::JSON ]) : mixed
Parameters
- $data : mixed = ''
- $code : int = 200
- $type : string = AerosLibClassesResponse::JSON
request()
Makes HTML requests with cURL PHP built-in function, also, grabs values, params, from a specific HTTP method.
request([mixed $opts = '' ][, array<string|int, mixed> $keys = [] ]) : mixed
Parameters
- $opts : mixed = ''
- $keys : array<string|int, mixed> = []
redirect()
Redirect function is a wrapper for Redirect class and performs a redirect with arguments.
redirect(string $redirect[, array<string|int, mixed> $arguments = [] ][, string $request_method = 'GET' ]) : void
Parameters
- $redirect : string
- $arguments : array<string|int, mixed> = []
- $request_method : string = 'GET'
dd()
Dump and die for testing purposes.
dd(string|mixed ...$args) : void
Parameters
- $args : string|mixed
cache()
cache() function is a Predis wrapper.
cache() : Cache
Return values
Cachecomponent()
Component function is a wrapper for the Component class which renders and returns HTML content to the browser.
component(string $component[, array<string|int, mixed> $data = [] ][, bool $return = false ]) : mixed
Parameters
- $component : string
- $data : array<string|int, mixed> = []
- $return : bool = false
-
If true, the component body will be returned instead of being dumped
env()
Gets an ENV variable if exists, otherwise, if $default is not null, sets the new value.
env(string $key[, string $default = NULL ]) : mixed
Parameters
- $key : string
- $default : string = NULL
setCookieWith()
Creates a cookie with mixed values (callables are not supported).
setCookieWith(string $key, mixed $value, int|array<string|int, mixed> $params[, string $path = '/' ][, string $domain = '' ][, bool $secure = false ][, bool $httponly = false ]) : bool
Parameters
- $key : string
- $value : mixed
-
Callable type is not supported
- $params : int|array<string|int, mixed>
- $path : string = '/'
- $domain : string = ''
- $secure : bool = false
- $httponly : bool = false
Return values
booldeleteCookie()
Deletes a cookie by $key.
deleteCookie(string $key[, bool $clear = false ]) : bool
Parameters
- $key : string
- $clear : bool = false
Return values
boolcookie()
Returns the main cookie or a specific one.
cookie([string $key = null ]) : mixed
Parameters
- $key : string = null
sanitizeWith()
Sanitizes a value by reference.
sanitizeWith(mixed $vector, array<string|int, mixed> $categories[, string $replacement = '' ]) : mixed
Parameters
- $vector : mixed
- $categories : array<string|int, mixed>
- $replacement : string = ''
db()
Wrapper for DB conection and all its handlers.
db([string|null $driver = null ]) : Db
Parameters
- $driver : string|null = null
-
-
sqliteorsqlite:db_alias
-
Return values
Dbcsrf()
Embeds a CSRF token into a hidden input.
csrf() : string
Return values
stringworker()
Returns the main app worker.
worker() : Worker
Return values
Workerencryptor()
Returns the global encryptor.
encryptor() : Encryptor
Return values
Encryptorsession()
Returns the global session object.
session() : Session
Return values
Sessionconfig()
Returns values or objects from config files.
config(string $from[, mixed $default = null ]) : mixed
Parameters
- $from : string
- $default : mixed = null
logger()
Appends a message into a log file.
logger(mixed $message, string $logFile[, bool $createFile = false ]) : bool
Parameters
- $message : mixed
- $logFile : string
-
Path and filename.
- $createFile : bool = false
-
Flag to create the log file if it does not exist.
Return values
boolqueue()
Returns the queue instance.
queue() : Queue
Return values
Queuecron()
Returns an instance of Cron.
cron() : Cron
This is a wrapper for Scheduler class.
Return values
CronisInternal()
Validates if the current user is internal.
isInternal() : bool
Return values
boolstr_find()
Searches for a string within another string based on a list and returns true if one of the items from the list was found.
str_find(string $haystack, array<string|int, mixed> $needles) : bool
Parameters
- $haystack : string
- $needles : array<string|int, mixed>
Return values
boolpluralize()
Pluralizes a word.
pluralize(string $word) : string
Parameters
- $word : string
Return values
stringsingularize()
Singularizes a word.
singularize(string $word) : string
Parameters
- $word : string