From 71a86cada54ebc94d5723808b0616c7e378a3a27 Mon Sep 17 00:00:00 2001 From: Tim Nagel Date: Sun, 21 Sep 2014 20:06:06 +1000 Subject: [PATCH] BC BREAK: Add `handlesObject` method to ObjectPersisterInterface --- CHANGELOG-3.1.md | 2 ++ Persister/ObjectPersisterInterface.php | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG-3.1.md b/CHANGELOG-3.1.md index 0170373..ee9af70 100644 --- a/CHANGELOG-3.1.md +++ b/CHANGELOG-3.1.md @@ -12,3 +12,5 @@ https://github.com/FriendsOfSymfony/FOSElasticaBundle/compare/v3.0.4...v3.1.0 * 3.1.0 * BC BREAK: `DoctrineListener#scheduleForDeletion` access changed to private. +* BC BREAK: `ObjectPersisterInterface` gains the method `handlesObject` that + returns a boolean value if it will handle a given object or not. diff --git a/Persister/ObjectPersisterInterface.php b/Persister/ObjectPersisterInterface.php index 2b4c8ee..0df7f7e 100644 --- a/Persister/ObjectPersisterInterface.php +++ b/Persister/ObjectPersisterInterface.php @@ -68,4 +68,12 @@ interface ObjectPersisterInterface * @param array $identifiers array of domain model object identifiers */ public function deleteManyByIdentifiers(array $identifiers); + + /** + * If the object persister handles the given object. + * + * @param object $object + * @return bool + */ + public function handlesObject($object); }