Skip to content

Instantly share code, notes, and snippets.

@m0ppers
Created January 10, 2012 17:55
Show Gist options
  • Save m0ppers/1590241 to your computer and use it in GitHub Desktop.
Save m0ppers/1590241 to your computer and use it in GitHub Desktop.
public function init(Manager $moduleManager)
{
$events = StaticEventManager::getInstance();
$events->attach('bootstrap', 'bootstrap', array($this, 'initializeView'), 100);
$events->attach('bootstrap', 'bootstrap', function($e) {
require_once __DIR__.'/../../vendor/php-activerecord/ActiveRecord.php';
\ActiveRecord\Config::initialize(function($cfg) {
$cfg->set_model_directory(__DIR__.'/src/' . __NAMESPACE__ . '/Model');
$cfg->set_connections(array(
'development' => 'mysql://how-can-i@access-some-config-from/here:S'));
});
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment