|
| __construct ($controller, $config) |
|
| 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...
|
|
| 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) |
|
|
| _search ($search, $order, $params, $offset, $limit) |
|
| _totals ($search, $totals, $params) |
|
| _group ($search, $group, $column, $total, $limit, $params) |
|
| setId ($value) |
|
| getId () |
|
| publish ($property, $visibility=self::READABLE) |
| Publish a property (or hide it again). 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 5 of file Provider.php.
◆ __construct()
__construct |
( |
|
$controller, |
|
|
|
$config |
|
) |
| |
◆ _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.
Definition at line 45 of file Provider.php.
◆ getId()
◆ group()
group |
( |
|
$search, |
|
|
|
$group, |
|
|
|
$column, |
|
|
|
$total, |
|
|
|
$limit = null , |
|
|
|
$params = null |
|
) |
| |
Return the grouped totals for a column.
- Parameters
-
array | $search | Search criteria (key = search type - see SEARCH_* constants, value = search compare value). |
string | $group | Column to group by. |
string | $column | Column to group the value for. |
string | $total | Total type (see \Rsi\Fred\controller::TOTAL_* constants). |
int | $limit | Positive for top, negative for bottom, zero for all (sorted by $column). |
array | $params | Extra parameters. |
- Returns
- array Key = group, value = total.
Definition at line 100 of file Provider.php.
◆ search()
search |
( |
|
$search, |
|
|
|
$order = null , |
|
|
|
$params = null , |
|
|
|
$offset = 0 , |
|
|
|
$limit = null |
|
) |
| |
Search for records in the dataset.
- Parameters
-
array | $search | Search criteria (key = column, value = array with key = search type - see SEARCH_* constants, value = search reference value). |
array | $order | Sort order for the result (key = column name, value = sort order - use PHP's SORT_* constants; SORT_ASC and SORT_DESC are always supported, combinations with SORT_NUMERIC, SORT_NATURAL and the like are depending on the type of provider and should also be shifted 4 bits up). |
array | $params | Extra parameters. |
int | $offset | Number of records to skip. |
int | $limit | Maximum number of records to return (empty = all). |
- Returns
- array Array with found records (key = column name).
Definition at line 64 of file Provider.php.
◆ setId()
◆ totals()
totals |
( |
|
$search, |
|
|
|
$totals, |
|
|
|
$params = null |
|
) |
| |
Return the totals for selected columns.
- Parameters
-
array | $search | Search criteria (key = search type - see SEARCH_* constants, value = search compare value). |
array | $totals | Columns to return the totals for, assoc.array (key = column name, value = total type - see \Rsi\Fred\controller::TOTAL_* constants, one or multiple in an array). |
array | $params | Extra parameters. |
- Returns
- array Array with totals (key = column name, value = total).
Definition at line 81 of file Provider.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).
Definition at line 35 of file Provider.php.
◆ $_controller
◆ $_id
◆ $format
Format function to apply to each record (called with a single record by reference, and true as a.
Definition at line 17 of file Provider.php.
◆ $order
Basic/default order (same format as search function).
Definition at line 16 of file Provider.php.
◆ SEARCH_DATE
const SEARCH_DATE = 'date' |
Search for a single date (24 hours).
Definition at line 11 of file Provider.php.
◆ SEARCH_EXACT
const SEARCH_EXACT = 'exact' |
Search for values identical to the reference value (this may also be an array with.
Definition at line 9 of file Provider.php.
◆ SEARCH_FROM
const SEARCH_FROM = 'from' |
Search for values larger than the reference value.
Definition at line 7 of file Provider.php.
◆ SEARCH_LIKE
const SEARCH_LIKE = 'like' |
Search for values that match reference value with wildcard (? = 1 char, * = multiple chars).
Definition at line 12 of file Provider.php.
◆ SEARCH_MULTI
const SEARCH_MULTI = 'multi' |
Pseudo type to allow for multiple values.
Definition at line 14 of file Provider.php.
◆ SEARCH_RANGE
const SEARCH_RANGE = [self::SEARCH_FROM,self::SEARCH_TO] |
◆ SEARCH_TO
Search for values smaller than the reference value.
Definition at line 8 of file Provider.php.
The documentation for this class was generated from the following file:
- /var/www/fred.local/vendor/rsi/fred/src/Rsi/Fred/Controller/Provider.php