roles and empty($this->roles) ) { $this->Log(__FUNCTION__ . " We have roles, lets explode"); $this->roles = explode(',',$this->roles); } } public function hasRole( string $Role) { if (isset($this->roles[$Role]) ) return true; elseif ( isset($this->roles[ucfirst($Role) ] ) ) return true; else return false; } }