Flourish is currently in beta. For information about the release schedule, please see the roadmap.
Flourish Blog
- Moving to GitHub 4/2/12
- Cutting Down on Spam 6/15/11
- Alter Table Improved, Especially for SQLite 5/24/11
- PHP|Tek 2011 5/18/11
- PHP Floating Point Bug 1/14/11
Thank You!
We just wanted to say thanks to those who have contributed to the project — see who.
Interested in supporting the project? Visit the Support page.
Around the Web
Flourish is a PHP unframework — a general-purpose, object-oriented library.
It has a modular architecture, meaning it isn’t strictly MVC. It focuses on being secure, well documented and easy to use, while solving problems intrinsic to web development.Why Use Flourish?
You will find Flourish useful if you need to write code that is any of the following:
- Secure
- Consistent and easy to understand
- Needs to model simple or complex databases, especially existing schemas
- Works with international data
- Can perform accurate math calculations
- Easily manipulates images
- Able to run on different databases (MySQL, PostgreSQL, SQLite, MSSQL, Oracle, DB2)
- Can be used on closed-source projects
- Needs to run on PHP 5.1.6
- Needs an architecture other than MVC
- Plays nicely with other libraries and frameworks
View Example Code
Below is an example of how to retrieve all active users from the database and print their name.
// Connect to our SQLite database fORMDatabase::attach(new fDatabase('sqlite', '/path/to/database')); // Create an object to represent rows in the database class User extends fActiveRecord { // Return an iterable set of User objects public static function findActive() { return fRecordSet::build( 'User', // Make User objects array('status=' => 'Active'), // That are active array('date_registered' => 'desc') // Ordered by registration date ); } } // Loop through and display the users' names foreach (User::findActive() as $user) { echo $user->prepareFirstName() . ' ' . $user->prepareLastName() . '<br />'; }
This example shows how to upload an image, resize it, and make a thumbnail.
// Create an fUpload object to handle the file upload $uploader = new fUpload(); // Require the user upload an image (with MIME type checking server-side) $uploader->setMIMETypes( array('image/jpeg', 'image/gif', 'image/png'), 'Please upload a .jpg, .png, or .gif image' ); // Move the image and then resize to fit a 500x300 canvas $image = $uploader->move('/path/to/images', 'image') ->resize(500, 300) ->saveChanges(); // Create a 32x32 thumbnail of the image $thumb = $image->duplicate('/path/to/thumbs') ->cropToRatio(1,1) ->resize(32,32) ->saveChanges();
Curious About Features?
Documentation
- It includes extensive documentation covering all code, plus the API and other general PHP topics
- It includes features and guidance to make sites more secure
Compability
- It works with PHP 5.1+
- It loves Linux/BSD, Solaris and Windows environments
- It uses UTF-8 everywhere and provides UTF-8 functions even without the mbstring extension
- It provides precise number support even without the bcmath extension
- It can manipulate images and automatically detects if GD or ImageMagick is installed
- It backports some PHP 5.2+ functionality to PHP 5.1 such as Httponly cookies and JSON
- No shell access is required, simply drop the classes in and go
Database/ORM
- It supports MySQL, PostgreSQL, SQLite, Oracle, IBM DB2 and Microsoft SQL Server
- It includes support for one dialect of SQL across all database types
- It supports almost all extensions for the supported databases
- It includes powerful, but intuitive object-relational mapping features
- Full support and auto-exploration of foreign key relationships
- Simple, shorthand notation for querying sets of records
- Multi-column primary key support
- A simple plugin system using hooks and callbacks
And More…
- It includes error/exception handling and debugging features that make bug fixing much simpler
- It is built with internationalization and localization in mind
- It is licensed under the MIT license
Check out the documentation for a list of all of the Flourish classes.

Twitter
Ohloh
GitHub
Bitbucket
Launchpad
IRC