__call 这个方法看起来好迷茫啊~ 求解

浏览:2086 发布日期:2013/01/07 分类:求助交流 关键字: 代码函数详解
最进在看一个网站的源码,发现这个__call 方法,
public function __call($method,$args) {
switch(strtolower($method)) {
// 判断提交方式
case 'ispost' :
case 'isget' :
case 'ishead' :
case 'isdelete' :
case 'isput' :
return strtolower($_SERVER['REQUEST_METHOD']) == strtolower(substr($method,2));
// 获取变量 支持过滤和默认值 调用方式 $this->_post($key,$filter,$default);
case '_get' : $input =& $_GET;break;
case '_post' : $input =& $_POST;break;
case '_put' : parse_str(file_get_contents('php://input'), $input);break;
……
return $input;

求教大牛 详细解释下这个的用法和实现过程~!
最佳答案
评论( 相关
后面还有条评论,点击查看>>