Installation
Reflect may be installed in several ways, choose your favorite.
Requirements
Before you install PHP Reflect, you will need an operating system with PHP 5.3.0 or later installed,
Reflect requires the json, reflection, tokenizer, pcre, and spl extensions. These extensions are usually compiled and enabled by default.
Composer
Put a file named composer.json at the root of your project, with the content below:
{ "require": { "bartlett/php-reflect": "2.*" } }
And ask Composer to install the dependencies:
$ php composer.phar install
You can also use Composer to create a new project from an existing Reflect package. This is the equivalent of doing a git clone checkout followed by a composer install of the vendors.
$ php composer.phar create-project bartlett/php-reflect path 2.*
Where path
is your install directory.
PHAR
The recommended way for newbies, or just to have a look on features of this library, is to download a PHP Archive that contain all required dependencies of PHP Reflect bundled in a single file.
$ wget http://bartlett.laurent-laville.org/get/phpreflect.phar $ chmod +x phpreflect.phar $ mv phpreflect.phar /usr/local/bin/phpreflect $ phpreflect
You can also immediately use the PHAR after you have downloaded it.
$ wget http://bartlett.laurent-laville.org/get/phpreflect.phar $ php phpreflect.phar