php - NetBeans Code Completion on Doctrine 2 Entities? -


What principle is there any way to complete the Netbeans code on 2 entities? I have a simple unit created with some protected variables and public methods. I create unit manager in my bootstrap.fp file like this:

$ em = EntityManager :: create ($ Conn, $ config);

I use my theory unit like this:

$ myObject = $ em- & gt; GetRepository ('Institutions MyObject') - & gt; FindOneById (1);

The real code works fine The problem is that NetBusiness is not fulfilling the code on MyObject's methods or properties. How do I enable it?

Netbeans code in your code sample is not able to complete the complete code, because of the combination with the parameter Using the method getRepository (), the netbeans must compile the function getRepository () to check the type of return.

A solution for that variable is to use type hinting:

  public function x () {/ * @ $ MyObject MyObjectType * / $ myObject = $ Em- & gt; GetRepository ('Institutions MyObject') - & gt; FindOneById (1); }  

Now you are able to complete the $ myObject code.


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -