* @return Dance
*/
public function addUser(User $user): Dance {
+ //Add from owning side
+ $user->addSubscriber($this);
+
$this->users[] = $user;
return $this;
* @return bool
*/
public function removeUser(User $user): bool {
+ //Remove from owning side
+ $user->removeSubscriber($this);
+
return $this->users->removeElement($user);
}
* @return Location
*/
public function addUser(User $user): Location {
+ //Add from owning side
+ $user->addSubscriber($this);
+
$this->users[] = $user;
return $this;
* @return bool
*/
public function removeUser(User $user): bool {
+ //Remove from owning side
+ $user->removeSubscriber($this);
+
return $this->users->removeElement($user);
}