public function setValidator($validator)
    {
        $this->callBeforeListeners('setValidator', [$validator]);
        $this->validator = $validator;
        $this->callAfterListeners('setValidator', [$validator]);
    }