[TYPO3-mvc] netbeans and factory object type hints / code completion
Stephan Petzl
spetzl at gmx.at
Tue May 18 18:08:55 CEST 2010
hi there,
this is not exactly relating to extbase, but since extbase without code
completion is not an option for me, i just decided to post this issue here:
i have a repository which is stored as a property in my controller.
since typo3 uses the makeInstance factory to instantiate objects the
type of the instance is not clear to netbeans initially.
thats why i always used a type hint, like that:
----------------------
/**
*
* @var Tx_AjadoProfiles_Domain_Repository_FrontendUserRepository
*/
private $frontendUserRepository;
----------------------
this worked very well, but not any more. i think netbeans got even more
clever and now (version 6.9) it recognises, that the property gets
overridden in the initializeAction:
----------------------
/**
* List action for this controller.
*
* @param Tx_AjadoArticles_Domain_Model_Article $article
* @return string
* @return void
*/
public function initializeAction() {
$this->frontendUserRepository =
t3lib_div::makeInstance('Tx_AjadoProfiles_Domain_Repository_FrontendUserRepository');
}
----------------------
the last line in the action overrides the original type hint, i guess,
so the code competion on $this->frontendUserRepository-> doesnt bring
any results...
any ideas what i could do?
--
Best Regards
Stephan Petzl
http://www.ajado.com
More information about the TYPO3-project-typo3v4mvc
mailing list