id = $id; $this->uid = $uid; $this->allow_cid = $allow_cid; $this->allow_gid = $allow_gid; $this->deny_cid = $deny_cid; $this->deny_gid = $deny_gid; } /** * Creates a new Entity with a new allowed_cid list (wipes the id because it isn't the same entity anymore) * * @param array $allow_cid * * @return $this */ public function withAllowedContacts(array $allow_cid): PermissionSet { $clone = clone $this; $clone->allow_cid = $allow_cid; $clone->id = null; return $clone; } }