首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > PHP >

复杂代码,请高手指教,该怎么处理

2012-02-11 
复杂代码,请高手指教PHP codeif ($req-hasParam(keyword)) {$folder $this-getUserAccount()-getMa

复杂代码,请高手指教

PHP code
        if ($req->hasParam('keyword')) {            $folder = $this->getUserAccount()->getMaildir()->getFolderById();        } 


请高手帮忙看下,像这句 $folder = $this->getUserAccount()->getMaildir()->getFolderById();,应该怎样去分析,怎样去分层理解,我是这样理解的,$this->getUserAccount()返回的应该是个对象,$this->getUserAccount()->getMaildir()返回的应该也是对象,然后再调用$this->getUserAccount()->getMaildir()这个对象的getFolderById()方法;现在是我一看到这么一长串就蒙了,以前总是面向过程写代码,现在看到这样的一长串,感到无从下手,请高手指教

[解决办法]
有点像ORM,这是什么框架?
[解决办法]
这个肯定是对象了,因为只有对象对有 ->方法

热点排行