摘要: 当返回json格式的数据时,不想自己组织结果集,可以利用类的call方法。json类: 1 _data = array(); 8 } 9 10 public function __call($method, $args) {11 if (!isset($args[0])) return null;12 13 $this->_data[$method] = $args[0];14 15 return $this;16 }17 18 function __set($pro... 阅读全文
posted @ 2013-09-11 14:11 幻星宇 阅读(428) 评论(0) 推荐(1) 编辑