Beispiel #1
0
 public function &__get($property)
 {
     switch ($property) {
         case 'name':
             $name = $this->name = $this->subject_desc . ' (' . $this->subject_code . ')';
             return $name;
         default:
             return parent::__get($property);
     }
 }
Beispiel #2
0
 public function &__get($field)
 {
     switch ($field) {
         case 'isWholeday':
             $retVal = floor($this->date / 86400) == floor($this->end_date / 86400) && $this->date % 86400 == 0 && $this->end_date % 86400 == 86399;
             return $retVal;
         default:
             return parent::__get($field);
     }
 }
Beispiel #3
0
 public function &__get($name)
 {
     switch ($name) {
         case 'fullname':
             $tmp = $this->fname . ' ' . $this->mname[0] . '. ' . $this->lname;
             return $tmp;
         default:
             return parent::__get($name);
     }
 }
Beispiel #4
0
 public function &__get($key)
 {
     switch ($key) {
         case 'coursename':
             $tmp = $this->course_name;
             return $tmp;
         case 'slug':
             $tmp = preg_replace('/\\W+/', '_', strtolower($this->course_name));
             return $tmp;
         default:
             return parent::__get($key);
     }
 }
Beispiel #5
0
 /**
  * Gets a user's sign in ip address, handling int to ip conversion
  *
  * @param  string $column
  *
  * @return string|int
  */
 protected function get_sign_in_ip($column)
 {
     $ip = parent::__get($column);
     $value = $ip != 0 ? long2ip($ip) : 0;
     return $value;
 }