Skip to content

Instantly share code, notes, and snippets.

@ken-b4u
Created May 9, 2013 08:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ken-b4u/5546255 to your computer and use it in GitHub Desktop.
Save ken-b4u/5546255 to your computer and use it in GitHub Desktop.
<?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