Skip to content

Instantly share code, notes, and snippets.

@basz
Created May 3, 2012 13:48
Show Gist options
  • Save basz/2585767 to your computer and use it in GitHub Desktop.
Save basz/2585767 to your computer and use it in GitHub Desktop.
conig override pattern
<?php
/**
* Global Configuration Override
*
* You can use this file for overridding configuration values from modules, etc.
* You would place values in here that are agnostic to the environment and not
* sensitive to security.
*
* @NOTE: In practice, this file will typically be INCLUDED in your source
* control, so do not include passwords or other sensitive information in this
* file.
*/
/**
* Configuration service
*/
$configuration = array(
'phpBin' => null, /* null will attempt to auto-detection via exec 'which php' */
'ffmpegBin' => '/opt/local/bin/ffmpeg', /* used to build .mov movies */
'itemPrice' => 4, /* default item price */
'doTestPurchases' => true, /* will attempt to use the test environaments for payment vendors */
'paypalSellerEmail' => 'sales@bushbaby.nl', /* will attempt to use the sandbox, for sales */
);
/**
* You do not need to edit below this line
*/
return array(
'di' => array(
'instance' => array(
'store-configuration' => array(
'parameters' => array(
'options' => array(
'ffmpegBin' => $configuration['ffmpegBin'],
'itemPrice' => $configuration['itemPrice'],
),
),
),
'paypal-configuration' => array(
'parameters' => array(
'options' => array(
'recieverEmail' => $configuration['paypalSellerEmail'],
'doTestPurchases' => $configuration['doTestPurchases'],
),
),
),
'ideal-service-configuration' => array(
'parameters' => array(
'options' => array(
'test' => $configuration['doTestPurchases'],
),
),
),
/* phing build service */
'service-configuration' => array(
'parameters' => array(
'options' => array(
'phpBin' => $configuration['phpBin']
),
),
),
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment