php拦截器(魔术方法)

时间:2024-01-19 23:33:20

什么是PHP拦截器?

英文名称 “interceptor”,作用是 拦截 发送未定义的方法和属性的消息。

先看一段代码,定义了一个School类,实例化一个对象$obj,获取一个未定义的属性teacher,会发生什么呢?

<?php
class School
{ } $obj = new School;
var_dump($obj->teacher);

如果使用php命令行执行,可以看出,php报了一个未定义属性的Notice, $obj->teacher值是空值,所以打印出NULL

[root@localhost php]# php538 interceptor.php
PHP Notice: Undefined property: School::$teacher in /usr/local/sina_mobile/apache/htdocs/php/interceptor.php on line
NULL

这里说明一下,php命令行执行和浏览器页面执行不一定完全一样,我们可以看下面截图,web server是 apache执行同样脚本时候,apache回告浏览器的是未带php报出的Notice,返回给浏览器的是一个200 OK,这里面存在这php和web server的交互以及web server和浏览器的交互问题。

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAABRMAAAEZCAIAAACLiSULAAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAgAElEQVR4nO3db4wsR33w++rn+gZslIBkyH1eYGxyZo7y7LO5Ekex5XSTOBhsM7PPA5MnYWOJxBs9+M4ohqsdMMdx8DoksAQ7x4SZ2CcwEx7CIkUxQ6I7MZru+E/gOtJOkBNQFJYNOdPHWInuvS+sCMnwOCHg0/fFj63U6T81Pf9nZ78fgTWnp7u6uqqnflXd1b3Ogw+dv+fuu9Qx8Tsf+/3ane9cdC4AAAAAACfIFYvOwMhan/qjRWcBWDwuIQEAAABzc/xGznfXa4vOwhAfa7TUccjnFK3eIS/5EUn2AAAAAMzHPEbOQRDs7u7u7+9PJbUXX3xxKunMyFVXXaU/L3lWp2X1DnnJj8jMHgAAAIA5+A/JRZ7nBUGg/xmGoeM4c8wSAAAAAABLJGXkvOSi2bjlllueeOIJc8nFixd/5Ed+5OLFi6MmNdN8zsjYByuO4yHbLfkRLea3BwAAAJxUKzJyfuWR7e3tsYciORcOTSc1qxcvXnylYewx6kj07mIXBVKNcbB6w+Qh33rrral7t5dDbJPt7e1XXi5Zv+aOXvnKV453CHmOKJbDsc+0yc38NwYAAADgciOPnJ0jzWZTlsh0bmFO89YLy+WyPQWZH+44jud5Sqlms6nXSWYgNop48sknX/WqV33+85//1re+9a1vfWtjY+MTn/jE2AMS85+vf/3rv/Wtb73+9a8fe1RjZvLMmTNf+cpXJJNf+cpXzpw58+STT46Xz5zMYjl37pwsvPXWW1P3O97BiqzakeP9yle+8o53vENGyPZySGb44x//uPxTKSUfPv7xjyczoLf6/Oc//6pXvcpesFklMPSIpnKm5dn70K1G/c0CAAAAmFD6G8JiY13NcZzBYFAoFJRSnuedPn26VCrJIEcpFQRBuVyWz47j+L5fKpWUUrVa7eDgwJKC7FE2DMOwXq9bhgeXLl0y//mOd7zjc5/73M033yzLb775Zv15VJcuXRpvQ1NkTPTVqUkmr7vuOlly3XXXfe5zn3vHO97xz//8zxPuLss3v/nNG264QRdFEAQ6M1M5TFPqIet/XnfddVtbW48//nitVrOUgyXDOttZGdBHdPPNN//N3/zNT/7kT9oLdmgJWCpx8jNtvPI3t2LwDAAAAMxZ+j1n3/f1Da7BYCAL5X5ysViUu8H9fv/ChQtKqVarJXeJ9Xg7CALXdWVIrJSqVCr2FGSP8kEG1Y7jhGGYmjfzXtyTTz55ww03vPnNb069U3e1YehynfKzzz579dVXv/e975UPya0++clPypJPfvKTqenEspqayTe/+c1KqWeffdbcy9A9lkqlJ5988uqrry6VSqVSSS9/8sknS6WSmf511133zDPPxG5vXn311c8888wv/uIvyspmauauZY+xXcfyY+4utXZU2uwASzmkZtiSWtZX11133Q033CDpyEEJWRIrgeQKWUc0xpmWLMbY3qO0Ks6zle0HDQAAAGAGRput7bquOWDY3t7Wb96OjDH2SCkk15Gvtra2UsfPOQdUr371qz/ykY88//zzzz///KOPPvrqV7/avlxSe+qpp66//vpnnnnmYx/7mJn+q1/96meeeUa26na7Tz311LPPPnvfffc9f8Qy6MrK5PXXXy9zmFXagDO5R1l+++23P//8871e733ve1+325WFvu+/733vi6X/6KOP3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wIaRMwAAAAAANoycAQAAAACwYeQMAAAAAIANI2cAAAAAAGwYOQMAAAAAYMPIGQAAAAAAG0bOAAAAAADYMHIGAAAAAMCGkTMAAAAAADaMnAEAAAAAsGHkDAAAAACADSNnAAAAAABsGDkDAAAAAGDDyBkAAAAAAJsrxtjmww80p54PAACwQAR3AAAsnAcfOn/P3XctOhsAAAAAACwpZmsDAAAAAGDDyBkAAAAAABtGzgAAAAAA2DByBgAAAADAhpEzAAAAAAA2/z+ahxa8ziTk5wAAAABJRU5ErkJggg==" alt="" width="1065" height="229" />

针对前面的代码,我们想,如果访问teacher的时候,teacher属性不存在,我们可以拦截到对teacher的调用请求,并且做一些操作,那么这个就是php的拦截器,php拦截器提供了多种方法,这里__get方法就是访问未定义的属性时候被调用的。我们看下面代码和结果

<?php

class School
{
function __get($var)
{
echo $var; echo "\r\n";
return "hello";
} public $name = "Tom"; } $obj = new School;
var_dump($obj->teacher);
var_dump($obj->name);

执行以下结果如下,说明一下,__get方法必须拥有一个参数,该参数就是调用的未定义的属性名称,函数会将return 结果赋值给该调用的未知属性。

[root@localhost php]# php538 interceptor.php
teacher
string() "hello"
string() "Tom"

php提供了哪些拦截器方法

在有些文章中,把php拦截器一起称未php魔术方法,这里我们把这些方法做个整理

序号 方法名 作用 实现版本
1 __get($property) 访问未定义的属性时候,调用该方法 >= PHP 5.3.0
2 __set($property, $value) 给未定义属性设置值的时候,调用该方法 >= PHP 5.3.0
3 __isset($property) 对未定义属性调用isset()时,调用该方法 >= PHP 5.1.0
4 __unset($property) 对未定义属性调用unset()时,调用该方法 >= PHP 5.1.0
5 __call($property, $args_array) 调用未定义方法时,执行该方法 >= PHP 5.3.0
6 __autoload($classname) 请求类时,先执行该方法 >= PHP 5.3.0
7 __construct($args) 一个类中,只有一个构造函数,new 类的时候,构造函数优先被执行  
8 __destruct() 一个类中,只有一个析构函数,释放类的时候,析构函数被执行  
9 __clone() 使用clone创建对象副本时候,该方法被调用 >= PHP 5.3.0
10 __tostring() __toString() 方法用于一个类被当成字符串时应怎样回应 >= PHP 5.2.0
11 __sleep() serialize() 函数会检查类中是否存在一个魔术方法 __sleep()。如果存在,该方法会先被调用,然后才执行序列化操作 >= PHP 5.3.0
12 __wakeup() unserialize() 会检查是否存在一个 __wakeup() 方法 >= PHP 5.3.0
13 __set_state 调用 var_export() 导出类时,此静态 方法会被调用。  >= PHP 5.3.0
14 __invoke 当尝试以调用函数的方式调用一个对象时,__invoke() 方法会被自动调用。  >= PHP 5.3.0
15 __callstatic() 用静态方式中调用一个不可访问方法时,__callStatic() 会被调用  
16 __debugInfo() 使用var_dump()打印对象的时候,该方法被调用 >= PHP 5.6.0

详细情况见 http://php.net/manual/zh/language.oop5.magic.php介绍

结论

 在这里,可以把上表中序号1-5的方法称之为拦截器方法,后面称之为魔术方法,魔术方法可以理解成是提供给php程序员对php标准函数的"重写", 可以理解成zend虚拟机,在解析php脚本的时候,发现一些未定义的方法属性,或者发现一些提供用户重载的标准函数,如clone,serialize等时候,优先查看是否有需要自行的魔术方法。

参考文献:

《深入PHP面向对象、模式与实践》(第3版)/(美)Zandstra,M. 著,陈浩等译. 北京:人民邮电出版社,2011.7 ISDN 978-7-115-25624-9