【发布时间】:2015-12-27 07:53:55
【问题描述】:
使用 PHP + Doctrine 我得到了这个:
//retrieve data
$entityManager = $this->getEntityManager();
$all = $entityManager->getRepository('\Entity\ServiceType')->findAll();
foreach($all as $value)
$options[$value->getId()] = $value->getServiceType();
IDE 中的自动完成功能不建议遵循-> 的方法,即getId() 和getServiceType() 之类的方法。
而且 PHP 不提供(简单的)转换为所需的类型....
【问题讨论】:
-
使用的是哪个 ide?span>
标签: php doctrine-orm autocomplete phpdoc zend-studio