public function onInitAccessToken($event)
    {
        $sender = $event->sender;
        /* @var $sender static */
        $sender->setAccessToken(sha1(Yii::$app->security->generateRandomString()));
    }
public function onInitAccessToken($event)
    {
        $sender = $event->sender;
        /* @var $sender static */
        $sender->setAccessToken(sha1(Yii::$app->security->generateRandomString()));
    }
public function onInitAccessToken ( $ event ) { $ sender = $ event -> sender ; /* @var $sender static */ $ sender -> setAccessToken ( sha1 ( Yii :: $ app -> security -> generateRandomString ( ) ) ) ; }
Initialize the access token attribute.
This method is ONLY used for being triggered by event. DO NOT call,
override or modify it directly, unless you know the consequences.
@param ModelEvent $event
Initialize the access token attribute . This method is ONLY used for being triggered by event . DO NOT call override or modify it directly unless you know the consequences .