Register api log manipulator & repository

This commit is contained in:
Nicolas Le Goff
2014-03-06 16:04:24 +01:00
parent 6f05d704c1
commit f0d9cf7324
2 changed files with 8 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ use Alchemy\Phrasea\Model\Manipulator\ACLManipulator;
use Alchemy\Phrasea\Model\Manipulator\PresetManipulator;
use Alchemy\Phrasea\Model\Manipulator\ApiAccountManipulator;
use Alchemy\Phrasea\Model\Manipulator\ApiApplicationManipulator;
use Alchemy\Phrasea\Model\Manipulator\ApiLogManipulator;
use Alchemy\Phrasea\Model\Manipulator\ApiOauthCodeManipulator;
use Alchemy\Phrasea\Model\Manipulator\ApiOauthRefreshTokenManipulator;
use Alchemy\Phrasea\Model\Manipulator\ApiOauthTokenManipulator;
@@ -77,6 +78,10 @@ class ManipulatorServiceProvider implements ServiceProviderInterface
$app['manipulator.api-oauth-refresh-token'] = $app->share(function ($app) {
return new ApiOauthRefreshTokenManipulator($app['EM'], $app['repo.api-oauth-refresh-tokens'], $app['random.medium']);
});
$app['manipulator.api-log'] = $app->share(function ($app) {
return new ApiLogManipulator($app['EM'], $app['repo.api-logs']);
});
}
public function boot(SilexApplication $app)

View File

@@ -100,6 +100,9 @@ class RepositoriesServiceProvider implements ServiceProviderInterface
$app['repo.api-accounts'] = $app->share(function (PhraseaApplication $app) {
return $app['EM']->getRepository('Phraseanet:ApiAccount');
});
$app['repo.api-logs'] = $app->share(function (PhraseaApplication $app) {
return $app['EM']->getRepository('Phraseanet:ApiLog');
});
$app['repo.api-applications'] = $app->share(function (PhraseaApplication $app) {
return $app['EM']->getRepository('Phraseanet:ApiApplication');
});