LiveUser applications
| From: | Rodrigo Alvarez | Date: | Thu, 09 Jun 2005 17:42:53 +0000 |
| Subject: | LiveUser applications | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-19581@lists.php.net to get a copy of this message | ||
Hi PEARs,
I'm using Alan Knowles' HTML_FlexyFramework as backed for my own Framework/CMS. All requests pass through a Main class, where LiveUser is instantiated, to check user rights. SEF URLs are used (for example index.php/Section/Page/).
I will implement a Site tree through liveuser_applications, and map url aliases to "real" liveuser_applications. This allow the framework to point for example index.php/How_to_use_this (which doesn't exist really) to index.php/Manual/View/12.
The question is, how can I add each requested url to liveuser_applications (using LiveUser_Admin addApplication method), automatically, without incrementing the liveuser_applications_seq table?
Calling getApplications, and checking that the requested one is not present, would be the way, but this means an "extra" query to the database on each page request. I could be that caching getApplications query in any manner after each addAplication call solves the problem. Another way is to force the application_define_name field to be UNIQUE, and application_id auto_increment (MySQL), but this makes my framework not portable.
Any ideas?
Thanks in advance,
Rodrigo Alvarez.