在 Hangman 中定义的 GameController 使用到一些属性 word,可以使用$this->word 的格式来读写这个属性,但实际上在 GameController 对应到这个属性的方法为 /** * @return string the word to be guessed. This value is persistent * during the whole game session. */ public function getWord() { return $this->