Skip to content

Getting started

iNem0o edited this page Oct 8, 2013 · 2 revisions

Installing PicORM

The best way to install PicORM is to do it from Composer. Create a composer.json file to the root of your webapp with this content

{
    "require": {
        "picorm/picorm": "0.0.2"
    }
}

and then, install composer and download PicORM

curl -sS https://getcomposer.org/installer | php
php composer.phar install

Configuring PicORM

Once you include composer autoload, you juste have to configure your datasource and options

\PicORM\Entity::configure(array(
    'datasource' => new PDO('mysql:dbname=database;host=localhost', 'user', 'password')
));
Clone this wiki locally