= Install Guide
:description: PHP_Reflect may be installed in several ways, choose your favorite.
include::revision.txt[]
include::attributes.txt[]


[role="lead"]
Before you begin, ensure that you have at least
http://www.php.net[PHP] 5.2.0 installed.

== PEAR

PHP_Reflect should be installed using the http://pear.php.net/[PEAR Installer].
This installer is the backbone of PEAR, which provides a distribution system
for PHP packages, and is shipped with every release of PHP since version 4.3.0.

Registering the channel:
----
$ pear channel-discover bartlett.laurent-laville.org
----

Installing the latest version available:
----
$ pear install bartlett/PHP_Reflect
----

Installing a specific version:
----
$ pear install bartlett/PHP_Reflect-1.6.0
----

== Composer

Install http://getcomposer.org[Composer] in your root project with this command:
----
$ curl -s http://getcomposer.org/installer | php
----

Or http://getcomposer.org/composer.phar[download composer.phar] in your root project.

Put a file named `composer.json` at the root of your project, containing the dependency:
----
{
    "require": {
        "pear-bartlett/PHP_Reflect": "1.9.*"
    },
    "repositories": [
        {
            "type": "pear",
            "url": "http://bartlett.laurent-laville.org"
        }
    ]
}
----

And install this dependency with the following command:
----
$ php composer.phar install
----

Include Composer's autoloader, and use the `PHP_Reflect` class
[source,php]
----
<?php
require_once 'vendor/autoload.php';
----

== Git

You can also clone the project.
----
$ git clone git://github.com/llaville/php-reflect.git && cd php-reflect
----

Copy the `PHP` sub-folder in a `Bartlett` directory
accessible by your `include_path`.

When [label]#include_path# is equals to [label]#.:/php/includes#
====
----
$ mkdir /php/includes/Bartlett && cp PHP/* /php/includes/Bartlett
----
====
