Development on Va...
Follow
Find tag "ide"
10.0K views | +3 today
Development on Various Platforms
Your new post is loading...
Your new post is loading...
Rescooped by Ertunç Efeoğlu from Bonnes Pratiques Web
Scoop.it!

CodeIgniter Code Completion with the Netbeans IDE for PHP

CodeIgniter Code Completion with the Netbeans IDE for PHP | Development on Various Platforms | Scoop.it
CodeIgniter is my favorite web application framework for PHP and Netbeans is the IDE I use for all sorts of web development. The latest version of Netbeans IDE (6.9) has support for both Symfony an...

Via Shaker technologies
more...
Shaker technologies's curator insight, November 17, 2013 10:08 AM

I created a php file and named it “nb.php”. I filled this file with the following contents:

 

12345678910111213141516<?php/*** @property CI_Loader $load* @property CI_Form_validation $form_validation* @property CI_Input $input* @property CI_Email $email* @property CI_DB_active_record $db* @property CI_DB_forge $dbforge* @property CI_Table $table* @property CI_Session $session* @property CI_FTP $ftp* ....*/ClassController{}?>

 

And put the file inside my nbproject directory. Now I am getting code completion in my Netbeans for CodeIgniter.

Rescooped by Ertunç Efeoğlu from Bonnes Pratiques Web
Scoop.it!

My Beloved PHP » Blog Archive » Netbeans revisited: Code Completion for Code-igniter

My Beloved PHP » Blog Archive » Netbeans revisited: Code Completion for Code-igniter | Development on Various Platforms | Scoop.it

Netbeans 6.5 is good software, out of the box it offers code completion and validation for php, html, css, javascript including jquery, mootools etc.

Code Igniter is a rapid development framework for  PHP, it’s a flexible MVC-like system. Netbeans let you easily implements CodeIgniter powers, by offering code completion for CodeIgniter’s native Active record classes, libraries and helpers functions.


Via Shaker technologies
more...
Shaker technologies's curator insight, November 17, 2013 10:05 AM

Add the CodeIgniter System folder to the Netbeans Global Include Path:

Tools>Options>PHP>Add folder to  Global Include Path

This will give code completion for the helper functions and some more, but not for the Active record or database functions in a controller.

$this->db->...

To achieve more power, add this to your controller:
/**
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
*/

class Stylist extends Controller

Now you can type
$this->db->...
or
$this->dbforge->...
And you will get all available functions offered. Wow!

To make it really easy, add this to Tools->Options->Editor->Code Templates

New -> abbreviation:dbExpanded text: `$this->db->`New -> abbreviation:`codei`Expanded text: `

/**
* @property CI_Loader $load
* @property CI_Form_validation $form_validation
* @property CI_Input $input
* @property CI_Email $email
* @property CI_DB_active_record $db
* @property CI_DB_forge $dbforge
*/

Now you can easily insert the Codeigniter code just above your controller, by typing `codei` and TAB
or db TAB for $this->db->

That rocks, doesn`t it.

See also here and here