Advertisement
Guest User

Untitled

a guest
May 30th, 2015
225
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. /**
  2. * Constructor.
  3. *
  4. * @param IDependencyContainer $container
  5. */
  6. public function __construct(IDependencyContainer $container)
  7. {
  8. $this->container = $container;
  9. }
  10.  
  11. /**
  12. * Returns ReadBean database connection instance.
  13. *
  14. * @return Connection
  15. */
  16. protected function getDatabase()
  17. {
  18. return $this->container->get('database')->get();
  19. }
  20.  
  21. public function getProducts()
  22. {
  23. return $this->getDatabase()->getProducts();
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement