|
| | trans ($column, $key, $value, $params=null) |
| | Translates a value using the dataset. More...
|
| |
| | exists ($key, $value, $params=null) |
| | Check if a record exists in the dataset. More...
|
| |
| | __construct ($controller, $config) |
| |
| | search ($search, $order=null, $params=null, $offset=0, $limit=null) |
| | Search for records in the dataset. More...
|
| |
| | totals ($search, $totals, $params=null) |
| | Return the totals for selected columns. More...
|
| |
| | group ($search, $group, $column, $total, $limit=null, $params=null) |
| | Return the grouped totals for a column. More...
|
| |
| | propertyExists ($property) |
| | Check if a property exists (public or published). More...
|
| |
| | constants ($prefix=null) |
| | Return all constants. More...
|
| |
| | get ($key) |
| | Get one or more properties. More...
|
| |
| | set ($key, $value=null) |
| | Set one or more properties. More...
|
| |
| | __get ($key) |
| |
| | __set ($key, $value) |
| |
|
| const | COLUMN_TYPE_GLUE = '__' |
| |
| | $select = '*' |
| | Columns to select. More...
|
| |
| | $table = null |
| | Table(s) to select from (including joins and unions). More...
|
| |
| | $search = [] |
| | Custom search (key = column, value = SQL - :ref and :count can be used as placeholders for the. More...
|
| |
| | $where = null |
| | Basic where clause (without the 'where' keyword; empty = all rows). More...
|
| |
| | $args = [] |
| | Fixed parameters (in contrast to those provided during actions). More...
|
| |
| const | SEARCH_FROM = 'from' |
| | Search for values larger than the reference value. More...
|
| |
| const | SEARCH_TO = 'to' |
| | Search for values smaller than the reference value. More...
|
| |
| const | SEARCH_EXACT = 'exact' |
| | Search for values identical to the reference value (this may also be an array with. More...
|
| |
| const | SEARCH_DATE = 'date' |
| | Search for a single date (24 hours). More...
|
| |
| const | SEARCH_LIKE = 'like' |
| | Search for values that match reference value with wildcard (? = 1 char, * = multiple chars). More...
|
| |
| const | SEARCH_RANGE = [self::SEARCH_FROM,self::SEARCH_TO] |
| |
| const | SEARCH_MULTI = 'multi' |
| | Pseudo type to allow for multiple values. More...
|
| |
| | $order = [] |
| | Basic/default order (same format as search function). More...
|
| |
| | $format = null |
| | Format function to apply to each record (called with a single record by reference, and true as a. More...
|
| |
| const | HIDDEN = 0 |
| | Property is hidden. More...
|
| |
| const | READABLE = 1 |
| | Property is readable. More...
|
| |
| const | WRITEABLE = 2 |
| | Property is writeable. More...
|
| |
| const | READWRITE = 3 |
| | Property is readable and writeable. More...
|
| |
|
| | single ($select, $key, $value, $params=null) |
| | Return a single row from the dataset. More...
|
| |
| | implodeMulti ($where, $enclose=false) |
| |
| | where ($search, &$args, &$strict, &$loose=null, &$all=null) |
| | Build a where statement for use in an SQL query. More...
|
| |
| | order ($order) |
| | Build an order statement for an SQL query. More...
|
| |
| | _search ($search, $order, $params, $offset, $limit) |
| |
| | _totals ($search, $totals, $params) |
| |
| | _group ($search, $group, $column, $total, $limit, $params) |
| |
| | setDb ($value) |
| |
| | getDb () |
| |
| | getId () |
| |
| | setId ($value) |
| |
| | publish ($property, $visibility=self::READABLE) |
| | Publish a property (or hide it again). More...
|
| |
| | alias ($alias, $property, $object=null) |
| | Define an alias for a property (of another object). More...
|
| |
| | configure ($config) |
| | Configure the object. More...
|
| |
| | _get ($key) |
| | Default getter if no specific setter is defined, and the property is also not published (readable). More...
|
| |
| | _set ($key, $value) |
| | Default setter if no specific setter is defined, and the property is also not published (writeable). More...
|
| |
Definition at line 7 of file Db.php.
◆ _group()
| _group |
( |
|
$search, |
|
|
|
$group, |
|
|
|
$column, |
|
|
|
$total, |
|
|
|
$limit, |
|
|
|
$params |
|
) |
| |
|
protected |
◆ _search()
| _search |
( |
|
$search, |
|
|
|
$order, |
|
|
|
$params, |
|
|
|
$offset, |
|
|
|
$limit |
|
) |
| |
|
protected |
◆ _totals()
| _totals |
( |
|
$search, |
|
|
|
$totals, |
|
|
|
$params |
|
) |
| |
|
protected |
◆ exists()
| exists |
( |
|
$key, |
|
|
|
$value, |
|
|
|
$params = null |
|
) |
| |
Check if a record exists in the dataset.
- Parameters
-
| string | $key | Column to use to find the record. |
| mixed | $value | Value to use to find the record. |
| array | $params | Extra parameters. |
- Returns
- bool True if the record exists.
Reimplemented from Provider.
Definition at line 41 of file Db.php.
◆ getDb()
◆ getId()
◆ implodeMulti()
| implodeMulti |
( |
|
$where, |
|
|
|
$enclose = false |
|
) |
| |
|
protected |
◆ order()
Build an order statement for an SQL query.
- Parameters
-
| array | $order | Sort order for the result. |
- Returns
- string Order statement (including 'order by' keyword - empty if no criteria).
Definition at line 141 of file Db.php.
◆ setDb()
◆ single()
| single |
( |
|
$select, |
|
|
|
$key, |
|
|
|
$value, |
|
|
|
$params = null |
|
) |
| |
|
protected |
Return a single row from the dataset.
- Parameters
-
| string | $select | Column(s) to select. |
| string | $key | Column to use to find the record. |
| mixed | $value | Value to use to find the record. |
| array | $params | Extra parameters. |
- Returns
- mixed Row (multi column) or value (single column).
Definition at line 28 of file Db.php.
◆ trans()
| trans |
( |
|
$column, |
|
|
|
$key, |
|
|
|
$value, |
|
|
|
$params = null |
|
) |
| |
Translates a value using the dataset.
- Parameters
-
| string | $column | Column to get the translated value from. |
| string | $key | Column to use to find the record. |
| mixed | $value | Value to use to find the record. |
| array | $params | Extra parameters. |
- Returns
- mixed Found value for the column (false = not found).
Reimplemented from Provider.
Definition at line 37 of file Db.php.
◆ where()
| where |
( |
|
$search, |
|
|
& |
$args, |
|
|
& |
$strict, |
|
|
& |
$loose = null, |
|
|
& |
$all = null |
|
) |
| |
|
protected |
Build a where statement for use in an SQL query.
- Parameters
-
| array | $search | Search criteria. |
| array | $args | Bind variables for the query. |
| string | $strict | Where statement (including basic where clause, including 'where' keyword - empty if no criteria). |
| string | $loose | Where statement with loose evaluation of a 'like' criterion (including basic where clause, including 'where' keyword - empty if no criteria or not different to basic where clause). |
| string | $all | Where statement that will find all records (both strict and loose). |
Definition at line 60 of file Db.php.
◆ $_db
◆ $args
Fixed parameters (in contrast to those provided during actions).
Definition at line 16 of file Db.php.
◆ $search
Custom search (key = column, value = SQL - :ref and :count can be used as placeholders for the.
Definition at line 13 of file Db.php.
◆ $select
Columns to select.
Definition at line 11 of file Db.php.
◆ $table
Table(s) to select from (including joins and unions).
Definition at line 12 of file Db.php.
◆ $where
Basic where clause (without the 'where' keyword; empty = all rows).
Definition at line 15 of file Db.php.
◆ COLUMN_TYPE_GLUE
| const COLUMN_TYPE_GLUE = '__' |
Definition at line 9 of file Db.php.
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Controller/Provider/Db.php