Install Guide

PHP_Reflect may be installed in several ways, choose your favorite.

Before you begin, ensure that you have at least PHP 5.2.0 installed.

PHP_Reflect should be installed using the 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

Install Composer in your root project with this command:

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

Or 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

<?php
require_once 'vendor/autoload.php';

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 include_path is equals to .:/php/includes

$ mkdir /php/includes/Bartlett && cp PHP/* /php/includes/Bartlett