NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Enabling Code Insight for extensions


Joined: 28 Oct 2011
Posts: 2
Reply with quote
Hi, I am developing a project which uses the PHP Mongo extension. The server is a remote Apache server. It would seem that Code Insight won't recognise the Mongo classes, which is a bit irksome.

Is there a way to load such extension classes and functions so Code Insight will recognise them? I guess I could code skeleton PHP definitions for them and add those to my project, but that seems rather longwinded.
View user's profileFind all posts by Alfred ArmstrongSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
If you change your project Target PHP Version to 5.3, you should find Code Insight will work for Mongo.

Alternatively, download Mongo from http://www.mongodb.org/downloads and ensure it is referenced by your project and even if your own code cannot use it because it not loaded at runtime, PhpED will still use it for Code Insight.
View user's profileFind all posts by plugnplaySend private message


Joined: 28 Oct 2011
Posts: 2
Reply with quote
Thanks for your help, but could you please clarify what I have to do when you say "ensure it is referenced by your project"? I am not sure how to do that.

Cheers, Alfred
View user's profileFind all posts by Alfred ArmstrongSend private message
Guru master

Joined: 24 Jul 2009
Posts: 737
Reply with quote
Not having used Mongo myself, I didn't realise it didn't come with a PHP stub file.

I can create stub files but I don't currently have Mongo installed.

I've just done a search and found someone who has done a stub file http://creative-territory.net/post/view/id/44/

If you download and extract the PHP file that is listed on that forum page and put it anywhere in your project, PhpED will reference it. At runtime that file should not be included and then the binary extension will be used.
View user's profileFind all posts by plugnplaySend private message
Enabling Code Insight for extensions
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic