From f27027d3a85775b596cd82a8241346c0ab0909ad Mon Sep 17 00:00:00 2001 From: Phill Sparks Date: Thu, 22 Mar 2012 14:27:04 +0000 Subject: [PATCH] Added __isset and __unset to Fluent Signed-off-by: Phill Sparks --- laravel/fluent.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/laravel/fluent.php b/laravel/fluent.php index 1c83b468..58c70207 100644 --- a/laravel/fluent.php +++ b/laravel/fluent.php @@ -77,4 +77,20 @@ public function __set($key, $value) $this->attributes[$key] = $value; } + /** + * Dynamically check if an attribute is set. + */ + public function __isset($key) + { + return isset($this->attributes[$key]); + } + + /** + * Dynamically unset an attribute. + */ + public function __unset($key) + { + return unset($this->attributes[$key]); + } + } \ No newline at end of file