LiveUserPEAR::LiveUser authentication and permission framework |
[ AdvancedSearch | AreaMap ]
|
| Welcome to LiveUser | Documentation | RoadMap | Wishlist | About |
| Documentation | FAQ | References | Tutorials | Other |
|
Areas In LiveUser |
Table of Contents
Example
Example 2
1) fields(default: all fields from the first table in the "selectable_tables" property): this is an array containing the fields you want to fetch. the storage engine will attempt to automatically determine the most logical set of tables to join if necessary. this set of tables depends on the get*() method you called and can be affecred by the "selectable_tables" property. the order is relevant and therefore its not irrelevant which get*() method you call, even if the tables you are interested are listed in both "selectable_tables" arrays. Example
2) with(default: no with): this setting uses "withFieldMethodMap?" property to determine what get*() method should be used for the given field. The specified field is implicitly added to the field list, if its not already listed there explicitly. Example
this will fetch all the users from the perm database and it will do a join with the groupusers table in order to fetch the group_id field. it will then do a getGroups() call using the group_id of each row as the only filter. the result will be stored into a key "groups". 3) 'filters'(default: no filters): this is essentially a key value pair with the field on which the filter is to be executed is the key and the value is the criterion to match against. the simplest way is to have a simple scalar value which uses simple "=" comparisions. If you pass a php null value it will do an "IS NULL" check. if the value is a simple array that does not have a key "value" in any position an "IN ([comma separated list of values])" check will be made. if the value does contain a key "value", than it will also expect an "op" key which specifies the comparision operatator (like "=", "<", "NOT IN" etc.). If the value of the "value" key is an array it will create a comma separated list, if not it will just quote the value. multiple filters will be AND'ed. fields specified inside the filters will affect what tables are joined. 4) 'orders'(default: no order by): a simple array containing the names of fields by which the result should be ordered. fields specified inside the orders will affect what tables are joined. 5) 'select'(default: 'all'): possible values are
6) 'rekey'(default: false): determines if the first dimension of the result where 'select' was set to 'all' should be the first column of each row. 7) 'group'(default: false): determines if all of the values with the same value in the first column when using the rekey option should be grouped inside another array. 8) 'limit'(default: none): determines if the number of rows in the result set should be limited by the given amount 9) 'offset'(default: none): determines if the given number of rows should be skipped at the beginning of the result set
This site powered by YaWiki 0.22 beta. |
|