[resolved] Code completion issue with PEAR/MDB2 |
Site Admin
|
btw, seems you forgot to assign $mdb2 variable with value returned from MDB2::factory();
but anyway, phpdoc for MDB2 is a bit broken and is not useful for PhpED's code completion engine. Indeed, MDB2::factory()'s phpdoc for returning value is:
So it tells that the class name is "a", so it can't be found if you change it to
it will start working for you. The same goes for MDB2_Driver_Common::prepare where you may want to add MDB2_Statement_Common as a returning class type: |
||||||||||||||||
_________________ The PHP IDE team |
|
would an easier way be:
|
||||||||||||||
|
Site Admin
|
or even shorter
|
||||||||||||||
_________________ The PHP IDE team |
|
|
||||||||||||
|
Site Admin
|
It's all explained in this thread. There are no problems on the IDE side.
Please read my post above. |
||||||||||||
_________________ The PHP IDE team |
|
I had tried many times,but still failed.
I already set the code insight path,and I extract the PEAR class into phped/include_lib. php.ini's include path: include_path = ".;C:\Program Files\nusphere\phped\include_lib;C:\Program Files\nusphere\phped\include_lib\PEAR" ↑It's just no MDB2,but have smarty:shock: Can you help me to figure out what's wrong with it? Thanks a lot! |
||||||||||||
|
Site Admin
|
Setting include_path will not change anything in code completion functionality. It's a pure php setting and may affect how and what php includes. It can't and won't be used by the ide to find out where the project files are. You have to create project, if you still havn't done it and set its properties, including Code Insight Includes list where you need path to PEAR.
Then don't forget about changes to PEAR's phpdoc blocks I told about above. |
||||||||||||
_________________ The PHP IDE team |
|
|
||||||||||||
|
Site Admin
|
Not at all. If you check MDB2_Driver_Common sources, you'll find that there are no such methods in it. They are available with MDB2_Result_Common class. |
||||||||||||||
_________________ The PHP IDE team |
|
Sorry,I can't clearly know why the compiler can pass,but I will check it out.
Thank you. |
||||||||||||
|
Site Admin
|
"compiler" has no relation. Php resolves references to methods at run-time. So you won't see such errors until you run your code.
|
||||||||||||
_________________ The PHP IDE team |
[resolved] Code completion issue with PEAR/MDB2 |
|
||
Content © NuSphere Corp., PHP IDE team
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by
Powered by phpBB © phpBB Group, Design by phpBBStyles.com | Styles Database.
Powered by