Created
July 17, 2013 16:50
-
-
Save yukikaoru/6022351 to your computer and use it in GitHub Desktop.
AppController to use Ray.Di in CakePHP
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
<?php | |
use Ray\Di\Injector; | |
App::uses('Controller', 'Controller'); | |
/** | |
* Application Controller | |
* | |
* Add your application-wide methods in the class below, your controllers | |
* will inherit them. | |
* | |
* @package app.Controller | |
* @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller | |
*/ | |
class AppController extends Controller | |
{ | |
/** @var Injector */ | |
private $injector; | |
public function setInjector(Injector $injector) | |
{ | |
$this->injector = $injector; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment