Skip to content

Commit

Permalink
bind JsonRenderer in singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
koriym committed Apr 29, 2015
1 parent d10c20c commit bd67513
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Provide/Representation/RepresentationModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use BEAR\Resource\JsonRenderer;
use BEAR\Resource\RenderInterface;
use Ray\Di\AbstractModule;
use Ray\Di\Scope;

class RepresentationModule extends AbstractModule
{
Expand All @@ -17,6 +18,6 @@ class RepresentationModule extends AbstractModule
*/
protected function configure()
{
$this->bind(RenderInterface::class)->to(JsonRenderer::class);
$this->bind(RenderInterface::class)->to(JsonRenderer::class)->in(Scope::SINGLETON);
}
}

0 comments on commit bd67513

Please sign in to comment.