Public Member Functions | |
| GenieGate_Properties (&$dbh) | |
| Constructor, needs a mysql handle. | |
| getSection ($section, $uid) | |
| Gets a PropSection, which can be used for setting the properties. | |
| createSection ($skey, $name) | |
| Creates a section. | |
| updateSection ($skey, $label) | |
| Update a section. | |
| getSectionId ($skey) | |
| Return the section ID for a given key. | |
| getSections ($depth=FALSE) | |
| Get an associative array of all sections. | |
| removeUser ($skey, $uid) | |
| Remove a users properties. | |
| getSectionProperties ($skey) | |
| Return all the properties for a given section. | |
| createProperty ($skey, $name, $desc) | |
| Creates a new property. | |
| undefineProperty ($skey, $prop) | |
| Undefine (remove) a property. | |
| getPropertyId ($section_key, $property_key=FALSE) | |
| Get an internal property ID, the meaning of this number is undefined, but it is a way to tell if the specified property exists. | |
| getDescription ($section_key, $property_key=FALSE) | |
| Return the verbal description of a given section name. | |
| addListener (&$listener) | |
| Add a listener. | |
| changePropertyLabel ($sect, $prop, $label) | |
| Alter the label of a property. | |
| firePropertyCreated ($section, $property, $description) | |
| Fires off the propertyCreated event. | |
| firePropertyChanged ($uid, $section, $property, $old_value, $new_value) | |
| Tells the listeners that a property has changed. | |
Properties are how specialized data can be associated to a user.
In order to provide as much flexibility as possible, specialized fields (such as telephone numbers or addresses) are implemented as a property. This also saves some space in cases where not every field is used, and it allows for the possible addition of "aliases".
Properties are divided into sections, so that additional plugins and other applications can have their own specialized field names.
Definition at line 138 of file Properties.php.
|
|
Add a listener. These recieve events when propertys are modified.
Definition at line 468 of file Properties.php. |
|
||||||||||||||||
|
Creates a new property. Before a property can be accessed, it needs to be defined. this defines it. If the property already exists, it returns FALSE. Definition at line 335 of file Properties.php. References firePropertyCreated(), getPropertyId(), and getSectionId(). |
|
||||||||||||
|
Creates a section. You should check with sectionId to see if the section already exists. (if $skey does exist, it dies with a message about it.) Therefore, if you want your application to fail because a reserved section key already exists, you can use this to do that. This method is typically used in the initial creation of a section, you may want to use updateSection().
Definition at line 183 of file Properties.php. References getSectionId(). Referenced by updateSection(). |
|
||||||||||||
|
Return the verbal description of a given section name. If $property_key is left blank, returns the description of the section.
Definition at line 435 of file Properties.php. References getSectionId(). |
|
||||||||||||
|
Get an internal property ID, the meaning of this number is undefined, but it is a way to tell if the specified property exists. Returns FALSE if the property does not exist.
Definition at line 394 of file Properties.php. References getSectionId(). Referenced by createProperty(). |
|
||||||||||||
|
Gets a PropSection, which can be used for setting the properties.
Definition at line 162 of file Properties.php. |
|
|
Return the section ID for a given key. This can be used to determine if a Section exists.
Definition at line 224 of file Properties.php. Referenced by changePropertyLabel(), createProperty(), createSection(), getDescription(), getPropertyId(), getSectionProperties(), removeUser(), undefineProperty(), and updateSection(). |
|
|
Return all the properties for a given section.
Definition at line 315 of file Properties.php. References getSectionId(). |
|
|
Get an associative array of all sections. The return value is an associative array, where the key is the section's key. The value is a textual description of the section. If $depth is TRUE, it will return a fairly complex associative array of arrays representing the section name and all it's underlying properties. (do a print_r for more detail)
Definition at line 260 of file Properties.php. |
|
||||||||||||
|
Remove a users properties. This will remove all the properties for the given user within the given section.
Definition at line 286 of file Properties.php. References getSectionId(). |
|
||||||||||||
|
Undefine (remove) a property. This removes all the property definitions.
Definition at line 365 of file Properties.php. References getSectionId(). |
|
||||||||||||
|
Update a section. This method will alter the label of a property section if $skey exists, otherwise it will create a new section by calling createSection() for you.
Definition at line 203 of file Properties.php. References createSection(), and getSectionId(). |
Documentation generated by DoxyGen