【发布时间】:2012-02-02 06:01:29
【问题描述】:
假设我在 PHP 中有一些胶水代码数据库,可以将数据库行加载到标准类中。
class TestObject
{
public $id;
public $name;
}
我有一个更新数据库的函数,因此它期望接收这样的类:
function updateEntry($testObjectData)
{
//do stuff
}
有没有办法向 Eclipse 暗示这个类实际上是“TestObject”的一个实例,而不是一些通用对象,因此使用了自动完成?
感谢您的帮助
【问题讨论】:
-
你尝试过使用类型提示吗? php.net/manual/en/language.oop5.typehinting.php
标签: php eclipse autocomplete