Exemple #1
0
 /**
  *
  * @param <type> $pField
  * @return scalar
  */
 public function __get($pField)
 {
     $map = self::field_map();
     if (array_key_exists($pField, $map)) {
         extract($map[$pField]);
         $j = $this->get_join($join);
         if (is_object($j)) {
             return $j->{$field};
         } else {
             //throw new Exception(__METHOD__ . ': cannot find ' . $join);
             return NULL;
         }
     }
     return parent::__get($pField);
 }
 /**
  *
  * @param string $pField
  * @return variant
  */
 public function __get($pField)
 {
     if (preg_match('~^employee_(.*)$~', $pField, $match)) {
         return $this->person()->{$match[1]};
     } else {
         return parent::__get($pField);
     }
 }