I did a huge-ass overhaul of the file-layout in Pundit which breaks every thing.. Or just a tad more than that.
So why did I do it? Developer-friendliness. You. Yes, You.
If you were to start developing an application using Pundit you had to:
And really, who wants to do all that. No, so the new file-structure already contains everything including a skeleton for your application with easy overloading of Pundit features. So now you only need to do the following:
See, much nicer.
index.php
.htaccess
application/
.htaccess
models/
controllers/
views/
library/
public/
.htaccess
js/
css/
library/
.htaccess
Pundit/
Solr/
Smarty/
scripts/
.htaccess
public/
.htaccess
js/
css/
Which, if you have used RoR, CakePHP or Pundit prior should be pretty self-explaining.
Or, it’s actually not new, just actually used for something now.
The standard way of doing configuration of Pundit is now using either application/config/config.php or application/config/config.ini (a config.xml will maybe follow) which will be autoloaded and parsed by Pundit.
I will post about all the stuff you can influence by changing configuration-settings later, but for now the ones listed in the default config file will do.
I’ve added support for using PATH_INFO instead of mod_rewrite if your host doesn’t support mod_rewrite. And as a matter of fact I’ve set this behavior as the default one for Pundit. If you need to change it back to the mod_rewrite way, set application.use_rewrite to true in your configuration file.
Since I’m beginning to use PHP-templates more lately I was getting bored of all the PunditRegistry::get(’sth’) or PunditRegistry::get(’config’)->get(’application’, ’sth’); calls. So I’ve added some shorthand-functions which you can activate by setting core.use_shorthand to true.
So far I’ve only added p_reg() and p_conf() which corresponds to the two calls listed before.
Of course I’ve updated the demo-application to correspond to the latest changes..
-fangel
May 12th, 2007 | Pundit