Created
May 5, 2014 17:39
-
-
Save danielgsims/b9e5ad85cf30a5c5ece7 to your computer and use it in GitHub Desktop.
Container Resolver
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$app = new \Slim\App(); | |
$app['resolver'] = new \Slim\Resolvers\ContainerResolver($app); | |
$app->get('/', 'MyController:index'); | |
$app->run(); | |
class MyController | |
{ | |
protected $app; | |
public function __construct(\Pimple $app) | |
{ | |
$this->app = $app; | |
} | |
public function index() | |
{ | |
$this->app['response']->write('Hello World'); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment