Added __isset and __unset to Fluent
Signed-off-by: Phill Sparks <me@phills.me.uk>
This commit is contained in:
parent
32e194ad21
commit
f27027d3a8
|
@ -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]);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue