Hey all. I've started work in a pretty major rewrite of Flourish. If anyone is interested in helping let me know, or if you just want to follow the progress checkout the GitHub page http://www.github.com/dotink/flourishToo.
Even though flourish 1.0 never got out of Beta, I think given the amount of time and the maturity of it we can take a lot of what we learned from it and start something pretty fresh. Here's a few core ideas behind the project:
1) Keep the API reminiscent of original Flourish 2) Make everything much more object oriented (see the README on the github site) 3) Make things more modular (split out various database support, add support for grammar translations) 4) Break ties to anything less than PHP 5.3
A few examples of where these principles have already been put into place are on the Text class and URL classes. Here's some examples:
$url = new URL(); // constructs a new URL object from the existing URL $url = $url->modify(['scheme' => 'https']); // Would replace current scheme with https $url->redirect('?q=test'); // would redirect the user to the URL appended with ?q=test
You can see that $url being object oriented acts more like a timestamp, where if you modify it you're returned a new object with the modifications.
Text consumed Grammar, and can be extended to support grammars for different languages:
$text = new Text('This is a long string that will be modified'); $text = $text->underscorize()
It also supports custom domains for compose() which can be used/passed to your callback and used with, say, gettext for easier modularization of translations.
$translation = $text->compose('forums');
You can work with multi-values...
$text = new Text($items); $joined_text = $text->pluralize()->join(',', 'or'); $text = $text->inflectOnQuantity('item', '%d items');
Anyway, there's some other ideas I had for objectification in the README. There's probably a few classes I'll do away with and allow others to build as soemthing separate... there's also going to be some different exceptions as well as some likely removed... and more! Follow on github and feel free to open issues there for general discussion.