Loading a Custom Config

By default, RocketShipIt loads default parameter values from config.php. There are two ways to override this.

  1. Set your OS’s enviornment variable to the directory of your config file:

  2. Pass in a config option:

    $config = new \RocketShipIt\Config;
    // Change individual aspects of config
    $config->setDefault('generic', 'shipper', 'My shipper');
    // Or load and entirely different config.php file
    $rate = new \RocketShipIt\Rate('Dhl', array('config' => $config));