Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
<?php
// -GameBaseController
class GameBaseController extends AppController {
protected $name = 'test';
}
// -GameAController
class GameAController extends GameBaseController {
public $components = array('GameExecute');
public function test() {
$this->GameExecute->test($this);
}
}
// -GameExecuteComponent
class GameExecuteComponent extends Component {
public function test($controller) {
var_dump($controller->name);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment