subscribeEvent('beforeMethod',array($this,'beforeMethod')); } function beforeMethod($method) { $this->beforeMethod = $method; return true; } }