Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5517dd41c4
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 20 lines (14 sloc) 0.564 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
<?php

namespace Provider\ActiveRecordServiceProvider;

use Silex\ServiceProviderInterface;
use Silex\Application;

class ActiveRecordServiceProvider implements ServiceProviderInterface {

public function register(Application $app) {
require_once $app['ar.lib_path'].'/ActiveRecord.php';
$app['autoloader']->registerNamespace('ActiveRecord', $app['ar.lib_path'].'/lib');
\ActiveRecord\Config::initialize(function($cfg) use ($app){
$cfg->set_connections($app['ar.connections']);
$cfg->set_default_connection($app['ar.default_connection']);
});
}

}
Something went wrong with that request. Please try again.