*/ class Game { protected $code; /** * Constuct a new Game * * @author Phil Burton */ public function __construct($name, $code) { $this->init($name, $code); } /** * Initalise the Game * * @author Phil Burton */ protected function init($name, $code) { // Do any pre set-up $this->code = $code; $handler = new Handler(['gameCode', 'name']); $handler->gameCode = $code; $handler->name = $name; $this->handler = $handler; } public function getHandler() { return $this->handler; } }