在一行语句里调用一个类的多个方法,该怎么写?
比如这句:
$this->m_button6PaneInfo->Movable( false )->Dock()->Fixed()->BottomDockable( false )->TopDockable( false )->Layer( 10 )->ToolbarPane();
class testcls{<br /> function fun1(){<br /> echo 'fun1';<br /> return $this;<br /> }<br /> function fun2(){<br /> echo 'fun1';<br /> return $this;<br /> }<br /> function fun3(){<br /> echo 'fun3';<br /> return $this;<br /> }<br />}<br />$test = new testcls();<br />$test->fun1()->fun2()->fun3();