在Zend快速入门指南http://framework.zend.com/manual/en/learning.quickstart.create-model.html上我们可以看到:
class Application_Model_Guestbook
{
protected $_comment;
protected $_created;
protected $_email;
protected $_id;
public function __set($name, $value);
public function __get($name);
public function setComment($text);
public function getComment();
...
Run Code Online (Sandbox Code Playgroud)
我通常在没有任何魔术方法的情况下创建我的getter和setter.我在快速指南上看过这个,我不明白为什么我们需要这个.
谁能帮我吗?
非常感谢