public function __get($key) { if (substr($key, -7) == 'Service' || substr($key, -3) == 'DAO') { return TXFactory::create($key); } return isset($this->_data[$key]) ? TXString::encode($this->_data[$key]) : null; }
/** * 实体化转义 * @param $content * @return string */ private function encode($content) { return TXString::encode($content); }
private function encode($value) { if (is_string($value)) { $value = TXString::encode($value); } elseif (is_array($value)) { $value = new self($value); } return $value; }