protected function getUserMethods() { if (empty($this->userMethods)) { $users = $this->getUserRepository(); $methods = get_class_methods($users); $this->userMethods = array_diff($methods, ['__construct']); } return $this->userMethods; }