SELF Preferences
Last updated: Thursday 26 February 2009 02:04
| Version |
Compatible with |
|
1.0
|
4.0.x
|
An improved version of eZPreferences-related tools.
This extension substitutes for default eZ Publish eZPreference API and operators.
It basically does the same thing, just slightly better (but also heavier).
The problems that are fixed with this extension:
- 4.0.x (and possibly other) bug with session vs. database data inconsistencies
- eZPreference limitations of 100 characters for values (way too little for serialization, for example)
- All variables treated as strings - here you have several datatypes/combinations
- Lack of automated serialization
- Complex values such as arrays or objects can now also have their INI-based default values
SELFPreferences supports (and maintains type of) most of variable types, categorized into 5 groups:
- integer (called as either one: integer, int, number)
- float (called as either one: float, double)
- boolean (called as either one: boolean, bool)
- string (called as either one: string, text)
- complex (called as either one: complex, serialize, object, array)
It is posible to use the following method to get/set preferences:
- PHP API
- eZ Template operators
- URLs ( /selfpreferences/set/{var_name}/{var_value}/{type_name}
eZ Template operators available:
selfpreferences_value( $name [, $userObject] )
selfpreferences_values( [$userObject] )
selfpreferences_setvalue( $name, $value, $typeName [, $storeUserID] )
1.0 Beta 2 available
Wednesday 25 February 2009 23:29
Piotrek Karaś