diff --git a/src/inventory/BaseInventory.php b/src/inventory/BaseInventory.php index dcf620bfd..63ecb4d8f 100644 --- a/src/inventory/BaseInventory.php +++ b/src/inventory/BaseInventory.php @@ -384,6 +384,10 @@ abstract class BaseInventory implements Inventory{ } } + public function removeAllListeners() : void{ + $this->listeners = []; + } + public function getListeners() : array{ return $this->listeners; } diff --git a/src/inventory/Inventory.php b/src/inventory/Inventory.php index 17be0db27..95ea5001a 100644 --- a/src/inventory/Inventory.php +++ b/src/inventory/Inventory.php @@ -164,6 +164,8 @@ interface Inventory{ */ public function removeListeners(InventoryListener ...$listeners) : void; + public function removeAllListeners() : void; + /** * @return InventoryListener[] */