/**
  * Sustains the name-alias relationship by synchronizing the updates of the both before passing the request on to
  * the parent's __set()
  * @see solidbase/lib/MenuItem#__set($property, $value)
  */
 function __set($property, $value)
 {
     if ($property === 'Name') {
         $property = 'alias';
     }
     parent::__set($property, $value);
 }
示例#2
0
 /**
  * Sets the variables of the object and updates the database if nescessary.
  * Unrecognized properties are forwarded to it's parent
  * @param string $property The property which to change
  * @param mixed $value The new value of the property
  * @see solidbase/lib/Base#__set($property, $value)
  */
 function __set($property, $value)
 {
     global $USER, $DB;
     if (in_array($property, array('title', 'header'))) {
         return $this->{'_' . $property} = $value;
     } elseif ($property == 'content') {
         return $this->{$property} = $value;
     } else {
         return parent::__set($property, $value);
     }
 }