Installation

Prerequisites

Phormium requires PHP 5.3 or greater with the PDO extension loaded, as well as any PDO drivers for databases to wich you wish to connect.

Via Composer

The most flexible installation method is using Composer.

Create a composer.json file in the root of your project:

{
    "require": {
        "phormium/phormium": "0.*"
    }
}

Install composer:

curl -s http://getcomposer.org/installer | php

Run Composer to install Phormium:

php composer.phar install

To upgrade Phormium to the latest version, run:

php composer.phar update

Once installed, include vendor/autoload.php in your script to autoload Phormium.

require 'vendor/autoload.php';

From GitHub

The alternative is to checkout the code directly from GitHub:

git clone https://github.com/ihabunek/phormium.git

In your code, include and register the Phormium autoloader:

require 'phormium/Phormium/Autoloader.php';
\Phormium\Autoloader::register();

Once you have installed Phormium, the next step is to set it up.