![]() |
FRED™
3.0
FRED™: Framework for Rapid and Easy Development
|
Public Member Functions | |
| __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... | |
Public Member Functions inherited from Thing | |
| 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) | |
Data Fields | |
| 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... | |
Data Fields inherited from Thing | |
| 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... | |
Protected Member Functions | |
| _search ($search, $order, $params, $offset, $limit) | |
| _totals ($search, $totals, $params) | |
| _group ($search, $group, $column, $total, $limit, $params) | |
| setId ($value) | |
| getId () | |
Protected Member Functions inherited from Thing | |
| 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... | |
Protected Attributes | |
| $_controller = null | |
| $_id = null | |
Protected Attributes inherited from Thing | |
| $_published = [] | |
| Published properties (key = name of property, value = visibility). More... | |
| $_aliases = [] | |
| Alias properties (key = alias, value = [object,property]). More... | |
Definition at line 5 of file Provider.php.
| __construct | ( | $controller, | |
| $config | |||
| ) |
Definition at line 23 of file Provider.php.
|
protected |
Reimplemented in Db, and Record.
Definition at line 87 of file Provider.php.
|
protected |
Reimplemented in Db, and Record.
Definition at line 49 of file Provider.php.
|
protected |
Reimplemented in Db, and Record.
Definition at line 70 of file Provider.php.
| exists | ( | $key, | |
| $value, | |||
$params = null |
|||
| ) |
Check if a record exists in the dataset.
| string | $key | Column to use to find the record. |
| mixed | $value | Value to use to find the record. |
| array | $params | Extra parameters. |
Reimplemented in Db, and Record.
Definition at line 45 of file Provider.php.
|
protected |
Reimplemented in Db.
Definition at line 114 of file Provider.php.
| group | ( | $search, | |
| $group, | |||
| $column, | |||
| $total, | |||
$limit = null, |
|||
$params = null |
|||
| ) |
Return the grouped totals for a column.
| 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. |
Definition at line 100 of file Provider.php.
| search | ( | $search, | |
$order = null, |
|||
$params = null, |
|||
$offset = 0, |
|||
$limit = null |
|||
| ) |
Search for records in the dataset.
| 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). |
Definition at line 64 of file Provider.php.
|
protected |
Definition at line 110 of file Provider.php.
| totals | ( | $search, | |
| $totals, | |||
$params = null |
|||
| ) |
Return the totals for selected columns.
| 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. |
Definition at line 81 of file Provider.php.
| trans | ( | $column, | |
| $key, | |||
| $value, | |||
$params = null |
|||
| ) |
Translates a value using the dataset.
| 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. |
Reimplemented in Db, and Record.
Definition at line 35 of file Provider.php.
|
protected |
Definition at line 20 of file Provider.php.
|
protected |
Definition at line 21 of file Provider.php.
| $format = null |
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.
| const SEARCH_DATE = 'date' |
Search for a single date (24 hours).
Definition at line 11 of file Provider.php.
| 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.
| const SEARCH_FROM = 'from' |
Search for values larger than the reference value.
Definition at line 7 of file Provider.php.
| 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.
| const SEARCH_MULTI = 'multi' |
Pseudo type to allow for multiple values.
Definition at line 14 of file Provider.php.
| const SEARCH_RANGE = [self::SEARCH_FROM,self::SEARCH_TO] |
Definition at line 13 of file Provider.php.
| const SEARCH_TO = 'to' |
Search for values smaller than the reference value.
Definition at line 8 of file Provider.php.