Example #1
0
 /**
  * Proxies getPerson()->$method as getPersonMethod in current object. Only for getters
  *
  * @param string $method
  * @param <type> $arguments
  * @return <type>
  */
 public function __call($method, $arguments)
 {
     if (preg_match('/^getPerson(.*)/', $method, $matches) && isset($matches[1])) {
         $method = "get" . $matches[1];
         return $this->getPerson()->{$method}();
     }
     if (preg_match('/^canPersonBe(.*)/', $method, $matches) && isset($matches[1])) {
         $method = "canBe" . $matches[1];
         return $this->getPerson()->{$method}();
     }
     parent::__call($method, $arguments);
 }
Example #2
0
 public static function model($className = __CLASS__)
 {
     return parent::model($className);
 }
Example #3
0
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new PersonalPeer();
     }
     return self::$peer;
 }