Skip to content

Commit

Permalink
fix registry
Browse files Browse the repository at this point in the history
  • Loading branch information
makasim committed Apr 21, 2015
1 parent c03e2fa commit 812a5ea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions src/Payum/Silex/PayumProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,7 @@ protected function registerService(Application $app)
}));

$app['payum.gateway_choices'] = $app->share(function ($app) {
$choices = array();
foreach ($app['payum.gateway_factories'] as $factory) {
/** @var $factory GatewayFactoryInterface */
$config = $factory->createConfig();

$choices[$config['payum.factory_name']] = $config['payum.factory_title'];
}

return $choices;
return array();
});

$app['payum.core_gateway_factory_config'] = $app->share(function ($app) {
Expand Down
2 changes: 1 addition & 1 deletion src/Payum/Silex/PimpleAwareRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ public function setPimple(\Pimple $pimple)
*/
protected function getService($id)
{
return isset($this->pimple[$id]) ? $this->pimple[$id] : $id;
return is_object($id) ? $id : $this->pimple[$id];
}
}

0 comments on commit 812a5ea

Please sign in to comment.