Skip to content

Instantly share code, notes, and snippets.

@brandonsavage
Created March 5, 2014 17:46
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save brandonsavage/b70169850496585fe7ab to your computer and use it in GitHub Desktop.
<?php
class MyController {
public function __construct(Aura\Di\Container $di) {
$this->di = $di;
}
public function myAction() {
$db = $this->di->db;
}
}
///
$di->set('database', function() { return new \PDO(); });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment