From: Florent Bruneau Date: Sat, 5 Jun 2010 12:47:10 +0000 (+0200) Subject: Implements __unset on Profile. X-Git-Tag: xorg/1.0.0~181 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=ddbebe4c0ce0da3d659050707559a02757aeaeee;p=platal.git Implements __unset on Profile. Signed-off-by: Florent Bruneau --- diff --git a/classes/profile.php b/classes/profile.php index 7c73903..4b0f30f 100644 --- a/classes/profile.php +++ b/classes/profile.php @@ -357,6 +357,16 @@ class Profile return property_exists($this, $name) || isset($this->data[$name]); } + public function __unset($name) + { + if (property_exists($this, $name)) { + $this->$name = null; + } else { + unset($this->data[$name]); + } + } + + /** Sets the level of visibility of the profile * Sets $this->visibility to a list of valid visibilities. * @param one of the self::VIS_* values