Exemple #1
0
 /**
  * Return the user entity in an array format
  *
  * @return     array  Array with all users attributes
  */
 public function __toArray() : array
 {
     $user = parent::__toArray();
     $user['right'] = $this->right !== null ? $this->right->__toArray() : [];
     $user['roomRight'] = $this->roomRight !== null ? $this->roomRight->__toArray() : [];
     return $user;
 }