/** * 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); }
public static function model($className = __CLASS__) { return parent::model($className); }
public function getPeer() { if (self::$peer === null) { self::$peer = new PersonalPeer(); } return self::$peer; }