Installation

Getting up and running with Sherlock is simple, although there are a few requirements:

Installation via Composer

The recommended installation method for Sherlock is through Composer.

  1. Add polyfractal/sherlock as a dependency in your project's composer.json file:
    {
        "require": {
            "polyfractal/sherlock": "0.1.*"
        }
    }
  2. Download and install Composer (if you don't have it installed already):
    curl -s http://getcomposer.org/installer | php
  3. Install Sherlock and various dependencies. This will create a /vendor/ directory with Sherlock and associated libraries:
    php composer.phar install
  4. Require Composer's autoloader

    Composer also prepares an autoload file that's capable of autoloading all of the classes in any of the libraries that it downloads. To use it, just add the following line to your code's bootstrap process:

    require 'vendor/autoload.php';

Manual Installation

Sherlock can be installed even if you don't use Composer. Download Sherlock and include the following in your index.php or equivalent

<?php
require 'Sherlock/Sherlock.php';
\Sherlock\Sherlock::registerAutoloader();

All done!

Once you have Sherlock installed, head over to the Quickstart Guide to get a crashcourse in how Sherlock works. Alternatively, check out the Full Documentation to get a feel for the entire library.