| Website | FigaroProject.org |
| Developer | RedBlok Creative Services |
| Latest Release | Build 0.1.063007 |
| Paradigm | PHP, MySQL and FLEX |
| Influenced By | Python, Ruby On Rails, Others |
| OS | Linux (running Apache) |
| License | Open Source (GNU) |
The Figaro Framework is designed to allow rapid development for PHP/FLEX developers by doing most of the develpers "data wrangling" for them. This allow them to work on the actual logic of their application without spending all of their time writing complex SQL queries to obtain their data.
Before installing the Figaro Framwork, you need to check that your web hosting provider fulfills the necessary conditions (don't panic! most do) and that you yourself possess the required skills (don't panic! it isn't complicated). Neither of the two should be a problem, but it is wise to verify first.
If you want to use the Figaro Framework on your own site but you're worried about installing it, you can submit a request to have us install it free of charge!
Find Out More About A Free Install
Out of the box applications live in this directory.
This is the heart and soul of Figaro. All of the custom built methods and functions reside in this directory.
Any 3rd party software lives in this directory - AMFPHP is installed by default to aid Flex developers.
This folder contains all of the template files and elements that Figaro uses for your site.
This folder contains the setup scripts to get Figaro up and running in a matter of moments.
A customizable file to write custom postback methods - All the same security issues with POST arrays still apply.
This file contains the settings for your database, filepaths, error reporting settings and template settings.
This file is invoked in every page served by Figaro - it loads your default database and initializes all of the Figaro methods.
This htaccess file hijacks all header requests and forces all global variables ($_GET, $_POST, etc.) into $Request. The purpose is two fold - security on all systems and clean, SEO friendly URLs.
Copy all of the files into the root of your webserver - keep the directory structure consitent with the diagram above.
To use a default installation of Figaro open config.Settings.php and edit lines 43-36 to match your MySQL databases server settings (db_server, db_user, db_pass, db_name). Save the file and you're good to go. Now Figaro knows what is in your database. (It's not Skynet smart - the figaro_start.php script calls $Mysql->buildSchema(); which in turn informs Figaro how your db is setup)
In order to use Figaro's page rendering engine you must create three files:
All of your php code (and Figaro shorthand) will be placed inside your Root level pages. Make sure you have configured your database settings on lines 43-46 in config.Settings.php.
There are two very useful ways to connect and pull information from your database without having to write a line of SQL. The two most useful are get(); and getBY();
The get(); function returns all or some of the fields from the table within your database as an array. All arguments are optional and if there are no arguements then it fetches the entire table.
$Database->table_name->get($fields = array(), $conditions = null, $orderBy = null, $limit = null)
Practical Uses:
The getBY(); function returns all or some of the fields from the table within your database as an array conditionally based on the table name used. I.E. getBYfieldname('1'); would return all of the fields in the database where fieldname = 1. Figaro automatically knows what all of your fieldnames are so you automatically have access to a getBY function for each table name in your database. Proper use: $Mysql->tablename->getBYfieldname('condition');
The foreach loop is the basis for most of your workload in Figaro.
//define your page template
$Page = new Page('path to template');
//define your content element
$Page->defineElement($thisPage, 'path to content element');
//use get to pull info from the db
$var = $Mysql->tablename->get('field1');
//loop thru the array using the names of the fields ($data['fieldname'])
foreach ($var as $row=>$data)
{
//use the .= to add each loops output to your variable otherwise only one result
$varList .= $data['field1'];
}
//send varList to your __RIGHTCOLUMN__ pointer in your content element
$Page->$thisPage->addContent('RIGHTCOLUMN', $varList);
//render the page
$Page->render();
Part of the power of Figaro is the library of lightweight but heavy hitting functions for real world applications built into the framework.
Free Installation
At the end of the installation process we will have provided you with all of the tools to start coding in Figaro along with all of the current open source Flex components that we have released that work with Figaro. We will provide as much assistance as we can in helping you through your learning curve but because we're a small shop we can't make any promises.
Disclaimer
This is a free service that we provide to the PHP community as a way to build good will and brand recognition while also learning more about how our software works in different hosting configurations. We retain the right to refuse this service to anyone for whatever reason. We really want to see our product take off, but if we decide that the subject matter of your site is inappropriate or may possibly offend our grandmothers we will politely but firmly reject your request for installation.
We are also not liable for anything... It's a free service and our software is open source so you install it or have us install it at your own risk.
Page Information
|
Wiki Information
|
![]() Update to PBwiki 2.0 An entirely new PBwiki experience, including folders and easier editing. |