From 7a557b917640a8cf8918c7426927a2571b254eec Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Sun, 10 May 2026 12:23:21 -0400 Subject: [PATCH] feat: add __call magic method to delegate undefined methods to $type Forwards any undefined method calls to $this->type to maintain forward compatibility with V3 changes. --- lib/Horde/Form/Variable.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/Horde/Form/Variable.php b/lib/Horde/Form/Variable.php index 85e713f..50b952a 100644 --- a/lib/Horde/Form/Variable.php +++ b/lib/Horde/Form/Variable.php @@ -139,6 +139,15 @@ public function getMessage() return $this->message; } + /** + * Forward calls to undefined methods to $this->type + * + */ + public function __call(string $method, array $args) + { + return $this->type->$method(...$args); + } + /** * Variable constructor. *