public function getGcmClient() { if ($this->_gcmClient === null) { $component = $this->gcm; $client = \Yii::$app->get($component); $this->_gcmClient = $client; } return $this->_gcmClient; }