CodeIgniter Forums
netbeans PHP include path - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: netbeans PHP include path (/showthread.php?tid=12392)

Pages: 1 2 3


netbeans PHP include path - El Forum - 10-17-2008

[eluser]erolyildiz[/eluser]
Hi,

I am using codeigniter with netbeans and would like to use code completion for codeigniter classes. I added all of the codeigniter folders under system folder to the PHP include path but code completion works partly. For example it can't complete $this->load() function for a class extending Controller class.

Shall I include other things to have a full code completion?

Thanks.

--
Erol


netbeans PHP include path - El Forum - 10-17-2008

[eluser]manilodisan[/eluser]
I doubt you will have full code completion in PHP frameworks with netbeans. You should try phpdesigner or Zend.


netbeans PHP include path - El Forum - 10-20-2008

[eluser]erolyildiz[/eluser]
I tried a version of eclipse which has PDT and a debugger offered in zend side and it can't do completion fully too. Again it can't complete $this->load function etc.


netbeans PHP include path - El Forum - 10-21-2008

[eluser]erolyildiz[/eluser]
I tried eclipse with PDT, easyeclipse php version, netbeans and komodo for auto completion and just komodo can do fully completion. None of the other editors can comeplete $this->load function but komodo can.

--
Erol


netbeans PHP include path - El Forum - 01-23-2009

[eluser]yudi_set[/eluser]
Hi,

I'm a newbie to PHP and CodeIginiter.
Code-completion is something that really helps me when learning CodeIgniter.

I just read an article on NB4PHP developer blog (http://blogs.sun.com/netbeansphp/entry/fwd_model_based_code_insight).
It refers to an article written for CakePHP.
But the principles apply to CodeIginter, too.

For example, I put it this way in a contoller :
<?php
/**
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
*
*/
class Form extends Controller
{
function index()
{
$this->load->helper(array('date','form'));
$this->load->library(array('email','form_validation'));

//Validaton rules
$this->form_validation->set_error_delimiters('<div class="error">', '</div>');
$this->form_validation->set_rules('member_no','Member Number','trim|required|numeric');
....
}
}

So, when we type $this-> it will offer load in the code-completion.
And when we type $this->load-> will offer all functions from the CI_Loader class.

Hope the info helps.


netbeans PHP include path - El Forum - 01-23-2009

[eluser]MyBelovedPHP[/eluser]
Thx, very good tip.
Netbeans is cool, another very useful one to add

* @property CI_DB_active_record $db

Now were getting code completion on

Code:
$this>db>...

One I use the most.


netbeans PHP include path - El Forum - 01-23-2009

[eluser]drale2k[/eluser]
That sounds really nice. At the moment i am using Dreamweaver CS4 for all my Stuff becouse i got a cheap student license.

But i am thinking of using some other editor just for PHP. Does Eclipse rock?


netbeans PHP include path - El Forum - 01-23-2009

[eluser]MyBelovedPHP[/eluser]
See here, with screenshot of code completion
http://www.mybelovedphp.com/2009/01/23/netbeans-revisited-code-completion-for-code-igniter/


netbeans PHP include path - El Forum - 01-23-2009

[eluser]PermanaJ[/eluser]
Wow, thanks a lot yudi_set ...


netbeans PHP include path - El Forum - 01-23-2009

[eluser]xwero[/eluser]
MyBelovedPHP great tips!