/** * Removes the given association from this Saga. When the saga is committed, it can no longer be found using the * given association. If the given property wasn't registered with the saga, nothing happens. * * @param AssociationValue $associationValue the association value to remove from the saga. */ public function removeAssociationWith(AssociationValue $associationValue) { $this->associationValues->remove($associationValue); }
private function containsAny(AssociationValuesInterface $associationValues, array $toFind) { foreach ($toFind as $valueToFind) { if ($associationValues->contains($valueToFind)) { return true; } } return false; }