/**
  * retrieve information about the object
  * @see lib/MenuItem#__get($property)
  */
 function __get($property)
 {
     if ($property === 'Name') {
         $property = 'alias';
     }
     return parent::__get($property);
 }
示例#2
0
 function __get($property)
 {
     if ($property == 'rawLink') {
         return parent::__get('link');
     }
     $parentProp = parent::__get($property);
     if ($property == 'link') {
         global $USER, $ID;
         return str_replace(array('$uid', '$pid'), array($USER->ID, $ID), $parentProp);
     }
     return $parentProp;
 }
示例#3
0
 /**
  * __get()
  * @desc Returns the property asked for, if allowed.
  * @access public
  * @param string $property The property asked for
  * @return mixed
  */
 function __get($property)
 {
     if ($property == 'ID') {
         return parent::__get($property);
     }
     if ($property == 'author') {
         return $this->getAuthor();
     }
     if ($property == 'content') {
         $this->loadContent();
         return $this->content;
     } elseif (in_array($property, array('header', 'title'))) {
         if (@$this->{'_' . $property}) {
             return $this->{'_' . $property};
         } else {
             return $this->Name;
         }
     } else {
         return parent::__get($property);
     }
 }