diff --git a/src/Infrastructure/View/SimpleView.php b/src/Infrastructure/View/SimpleView.php index d52e4e5..44e5833 100644 --- a/src/Infrastructure/View/SimpleView.php +++ b/src/Infrastructure/View/SimpleView.php @@ -221,6 +221,16 @@ public function __get( $property ) { return null; } + /** + * Magic isset to enable usage of isset() or empty() on context properties. + * + * @param string $property Property to check. + * @return bool + */ + public function __isset( $property ): bool { + return isset( $this->_context_[ $property ] ); + } + /** * Escape a value for output. *