Example #1
0
 function __get($property)
 {
     if ($property == 'Publish') {
         $r = $this->getActive();
         return $r['start'];
     } else {
         return parent::__get($property);
     }
 }
Example #2
0
 function __get($property)
 {
     if (in_array($property, array('Cal', 'Image', 'Activated'))) {
         return $this->{'_' . $property};
     } elseif ($property == 'Publish') {
         $r = $this->getActive();
         return $r['start'];
     } elseif ($property == 'Flows') {
         return $this->flows();
     } else {
         return parent::__get($property);
     }
 }
 /**
  * Returns the value of the variable asked for. If the property is unknown, question is passed to parent class.
  * @access public
  * @param string $property The property asked for
  * @return mixed
  */
 function __get($property)
 {
     if (!in_array($property, array('groups', 'groupIds', 'settings'))) {
         return parent::__get($property);
     }
     switch ($property) {
         case 'settings':
             return $this->{'_' . $property};
             break;
         case 'groupIds':
         case 'groups':
             return $this->groups($property == 'groups');
     }
 }
Example #4
0
 /**
  * Function for getting a event property
  * @param string $property Reqested property
  * @return string
  */
 function __get($property)
 {
     switch ($property) {
         case 'time':
             return $this->getTime();
         case 'text':
             $this->loadContent();
             return @$this->content['main'];
         case 'attendance_information':
             $this->loadContent();
             return @$this->content['attendance'];
         case 'start':
         case 'calendar':
         case 'end':
         case 'soft_deadline':
         case 'hard_deadline':
         case 'send_reminder':
             $this->loadEvent();
             return $this->{'_' . $property};
         default:
             return parent::__get($property);
     }
 }
Example #5
0
 function __get($property)
 {
     switch ($property) {
         case 'self':
             if ($this->_self === false) {
                 global $DB;
                 $this->_self = $DB->files->{$this->ID};
                 if (!$this->_self || !$this->_self['parent']) {
                     $this->_self = array('id' => $this->ID, 'parent' => false, 'name' => 'root');
                     $this->alias = 'fileRoot';
                 }
             }
             return $this->_self;
         case 'DirID':
             return $this->self['parent'];
         case 'Dir':
             if (!$this->DirID) {
                 return false;
             }
             global $Controller;
             return $Controller->{$this->DirID}(OVERRIDE);
         case 'path':
             if (!$this->_path) {
                 if ($this->DirID && $this->Dir) {
                     $this->_path = $this->Dir->path . '/' . $this->self['name'];
                 } else {
                     $this->_path = $this->rootDir();
                 }
             }
             return $this->_path;
         case 'filename':
         case 'dirname':
         case 'extension':
         case 'basename':
             if ($this->_filename === false) {
                 $this->expandPath();
             }
             return $this->{'_' . $property};
         case 'edited':
             if ($this->_edited === null) {
                 $this->_edited = filemtime($this->path);
             }
             return $this->_edited;
         case 'Type':
             return $this->Type;
         case 'Name':
             return $this->__toString();
         default:
             return parent::__get($property);
     }
 }