Functions
Get first element of an array
first(array<mixed,mixed> $array, mixed $valueIfEmpty = NULL
) : mixed
- PHP have the reset() method which do pretty the same thing, but we have to use a variable reference as parameter so we cannot
use an expression without a WARNING.
- "reset" is also not a great name for just retrieve the first element of an array.
- the FALSE return if array is empty is also weird. NULL by default is more logical.
Parameters
$array
array<mixed,mixed>
the array
$valueIfEmpty
mixed
(Optional, NULL) The value to return if array is empty
Returns
mixed
the first element of array or $valueIfEmpty if array empty
Get last element of an array
last(array<mixed,mixed> $array, mixed $valueIfEmpty = NULL
) : mixed
- PHP have the array_pop() method which do pretty the same thing, but we have to use a variable reference as parameter so we cannot
use an expression without a WARNING.
- "array_pop" also change the original array.
Parameters
$array
array<mixed,mixed>
the array
$valueIfEmpty
mixed
(Optional, NULL) The value to return if array is empty
Returns
mixed
last element of array or $valueIfEmpty if array empty
Classes, interfaces, and traits
AbstractConverter¶
Convert object values
« More »
B64Converter¶
Convert value to base64
« More »
Base¶
Base class for all business DAO objects
« More »
BaseQuery¶
Base class for all queries
« More »
Benchmark¶
Register and return times, count and data elements
« More »
ClauseType¶
List of Clause type (for register binds by source clauses)
« More »
CountQuery¶
Internal query for execution only
« More »
CreateTableQuery¶
Query for CREATE TABLE
« More »
DAOConverter¶
Convert DAO value for HTML display
« More »
DBHelper¶
Helper for execute queries
« More »
DatabaseHelper¶
Helper for Database operations
« More »
Field¶
Represent a field of a DAO object / Database column
« More »
HTMLConverter¶
Escape value for HTML usage
« More »
Input and Output variables - Require PHP 5.3.0
« More »
Model¶
Model class for all business DAO objects
« More »
RAWConverter¶
Return value without convert it
« More »
RowCountException¶
An exception thrown when a query don't return the expected rows number
« More »
SaltException¶
Exception of SALT Framework
« More »
SqlBindField¶
Handling Fields and Binds for Query and SqlExpr
« More »
SqlExpr¶
Construct a complex SQL expression
« More »
SqlStatement¶
A child of PDOStatement with some extra methods
« More »
ViewControl¶
Choose how to display the current page
« More »
Constants
Default precision of Benchmark timers
BENCH_PRECISION = 5
Default charset
CHARSET = 'UTF-8'
Launch I18n locales check
I18N_CHECK = FALSE
Default locale for ALL I18n instances
I18N_DEFAULT_LOCALE = 'en'
We cannot allow user to overwrite it. So the only way to change it is here, and it changed it for all applications linked to this SALT installation.
If we allow overwrite in each application, and if two applications use different value, classes generated for SALT framework will became unconsistent :
the I18N_DEFAULT_LOCALE set the parent class of all generated classes, so we cannot have a class A with parent B for an application, and class B with parent A for another.
Launch I18n class regeneration
I18N_GENERATE = FALSE
Locale for SALT I18n instance
I18N_LOCALE = 'en'
Mode for SALT I18n instance class generation
I18N_MODE = \salt\I18n::MODE_REGENERATE_ON_THE_FLY
Absolute path to SALT framework
PATH = \salt\Salt::saltPath()
Reserved prefix for everything (field, constant, methods) in child class of SALT classes
RESERVED_PREFIX = '_salt'
Last SALT release version
VERSION = '1.1.1'