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
ViewHelper¶
interface of all ViewHelpers.
« More »
Base¶
Base class for all business DAO objects
« More »
BaseQuery¶
Base class for all queries
« More »
BaseViewHelper¶
Parent class for *ViewHelper
« 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 »
DBHelper¶
Helper for execute queries
« More »
DatabaseHelper¶
Helper for Database operations
« More »
Field¶
Represent a field of a DAO object / Database column
« More »
Input and Output variables - Require PHP 5.3.0
« More »
Model¶
Model class for all business DAO objects
« 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 »
ViewControl¶
Choose how to display the current page
« More »
_InternalFieldAccess¶
Proxy for field access with ViewHelper
« More »
Constants
Default precision of Benchmark timers
BENCH_PRECISION = 5
Default charset
CHARSET = 'UTF-8'
Default locale for ALL I18n instances
I18N_DEFAULT_LOCALE = 'en'
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'