From 3b9016201050bfba5d96e6664743b470e290d5a8 Mon Sep 17 00:00:00 2001 From: Jean-Christian Denis Date: Thu, 20 Apr 2023 15:49:37 +0200 Subject: [PATCH] add ability to get an action description from anywhere --- src/AbstractCleaner.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/AbstractCleaner.php b/src/AbstractCleaner.php index 3c683ad..8924294 100644 --- a/src/AbstractCleaner.php +++ b/src/AbstractCleaner.php @@ -53,6 +53,16 @@ abstract class AbstractCleaner $this->actions = $actions; } + /** + * Get an action description. + * + * @return null|ActionDescriptor The action descriptor + */ + final public function get(string $id): ?ActionDescriptor + { + return $this->actions[$id] ?? null; + } + /** * Initialize Cleaner properties. *