Hey! Keep up to date with the project through its beta and public launch by following @getsparks.

Guide #1: Setting Up

This document will explain how to install the spark package manager for CodeIgniter Reactor. It will also explain how to prepare your CodeIgniter installation to use sparks without the package manager. One day, this package manager might be integrated into the CodeIgniter framework to facilitate rapid community code reuse.

Option 1. Setting up the Spark Manager (for user with PHP-CLI)
Option 2. Setting up without the Spark Manager
Option 3. Options 1 and 2 don't work

Option 1 (Recommended): Setting Up via the Spark Package Manager

For this option, it is required that you have the PHP Command-Line Interface (CLI) installed. If you don't, you can get it for OSX and Linux. For Windows, all you need to do is make sure php.exe is in your PATH. If you want to avoid the command line altogether, check out Option 2.

Users with the Modular Extensions system can follow the instructions here: Setting Up with Modular Extensions.

Quick Start for OSX and Linux

In order to use this quick start option, you should be using OSX or some flavor of linux.

  1. Via the shell, navigate to the root of your CodeIgniter application
  2. Copy and paste the following into the command line:
    php -r "$(curl -fsSL http://getsparks.org/go-sparks)"
  3. Press enter. If all goes well, move on to Get Sparks. If not, try the normal installation below.

Normal Installation

These instructions will work with all platforms:

  1. Download the sparks package: spark-manager.zip
  2. Extract the contents of the package into a folder named 'tools' in your CodeIgniter application root (not the application folder).
  3. Verify that in your root, you have a folder named 'tools', and inside is a file named 'spark'
  4. Download the Loader class extension: http://getsparks.org/static/install/MY_Loader.php.txt
  5. Move the Loader class to application/core/MY_Loader.php
  6. If all goes well, continue to Get Sparks.

Option 2. Setting up without the Spark Manager

This option will allow you to use CodeIgniter sparks without using the PHP CLI − something that isn't always available to developers.

  1. Navigate to the root of your CodeIgniter application (where the application and system directories reside by default)
  2. Create a directory named 'sparks'
  3. Create a new file: application/core/MY_Loader.php
  4. Copy the contents of http://getsparks.org/static/install/MY_Loader.php.txt into the file created above.
  5. Verify that the 'subclass_prefix' setting in application/config/config.php is set to MY_ .
  6. If all goes well, continue to Get Sparks.

Option 3. It Doesn't Go Well

Send us an email at ohcrap@getsparks.org, and let us know. We'll try and get you up and running.