Flourish is currently in beta. For information about the release schedule, please see the roadmap.
Flourish Blog
- New Oracle Support and More Tests posted 5/28/09
- Discussions and Comments posted 1/14/09
- Flourish Demo Site posted 1/5/09
- SQLite 3.2.8 Binary posted 1/3/09
- Announcing the Flourish Beta posted 11/19/08
Around the Web
Flourish is The PHP Unframework, an object-oriented PHP library designed to reduce code and improve security.
It’s not an MVC framework and it doesn’t try to solve every problem. Instead, it focuses on being small, portable, well documented and easy to use.Why Use Flourish?
Flourish provides classes to simplify many common and repetitive tasks in PHP with class APIs that are simple and intuitive. It is built to improve the compatibility of code across databases, operating systems and different versions of PHP. It helps produce code that is easy to write, and more importantly, easy to read and maintain.
So how can Flourish help you? The How Do I … ? page contains a list of common issues and the classes that can help. Topics include database interaction, UTF-8 string handling, image manipulation, money calculations and much more. Still not quite sure? Check out these code examples to see Flourish in action.
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 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 class documentation list for a list of all of the Flourish classes.

Twitter
Ohloh
GitHub
Bitbucket
Launchpad