【发布时间】:2011-08-20 06:57:21
【问题描述】:
我想知道如何对继承的类使用自动完成功能。例如,我有这种代码:
<?php
class A {
/**
* @return $this
*/
function a(){
return $this;
}
/**
* @return $this
*/
function b(){
return $this;
}
}
class B extends A{
function c() {
}
}
$object = new b();
$object->a()->b()->c();
?>
当我尝试使用 ctrl+click 导航时,我可以找到 a 和 b 功能,但我如何才能到达 c?
谢谢。
【问题讨论】:
-
你的意思是
fluent interface,而不是autocompletion。您可能想要编辑您的问题。 :) -
仅供参考,它不适用于 PHP Storm。