Welcome Guest, Not a member yet? Register   Sign In
codeignitier and eclipse
#21

[eluser]esra[/eluser]
[quote author="Sam Dark" date="1213030328"]I'm ok with Java but not very familiar with Eclipse SDK to do it. Plus how do you think it will process complex code like returning objects without PHPDoc?[/quote]

PDT (not Eclipse) uses PHPdoc comments to acquire information for code complete. In CI, one could do a search on var to find all instances of variables where the PHPdoc comments need to be added. It's probably possible, with some coordination, to add the comments to an upcoming version of the CI code, then transfer those comments to the next version release using a file comparator like WinMerge or BeyondCompare. This would allow a third-party to add the comments and a core developer could check the comments for accuracy as they were merged.

Currently, it's possible to generate PHPdoc API documentation for classes and class methods (less the variable comments) becuase those comments have existed in the files since at least 1.3.2 and possibly from the beginning.
#22

[eluser]Sam Dark[/eluser]
As an alternative we can get some additional completion by documenting class members in extended controller like this:

Code:
class Base_Controller extends Controller {
  /**
   * @var CI_Loader
   */
  var $load;
}
#23

[eluser]Rvnikita[/eluser]
How can I comment my model to have autocomplete them?
If it posible? of cause .)
#24

[eluser]SpooF[/eluser]
PHP Designer by mp Software does an amazing job at this, however the program gets really buggy after hours of use for some reason. If I start to write something like

Code:
$this->load->view('header');

I'll end up with

Code:
$this->load(->view('header'));
#25

[eluser]Sam Dark[/eluser]
Rvnikita, yes, it's possible.
Code:
class Blog extends Model {
   /**
     * @var CI_DB_active_record
     */
    var $db;
}
#26

[eluser]WoOzY KinG[/eluser]
I totally agree with Xkribble's "with/without docs" idea.

In fact, many open source projects now offer things like downloading with different optional components bundled. For example, jQuery; or talking about MVC, Kohana; and of course, Eclipse itself is like this as well, just that it's not as flexible as the other two I've mentioned. And of course there are many more.

Um, yeah, I'm sticking with CI of course, that's why I want it to be better Smile
#27

[eluser]manilodisan[/eluser]
PHPDesigner does that only at $this->load because, probably, it recognizes 'load' as a function and not a library how you write it.
#28

[eluser]Milos Dakic[/eluser]
I'd love to help with commenting the code =] I'll have some (2-3 hrs) free time over the next 6 months due to a break in school =] Could come in handy to have a few versions (sensible ones of course) which people can download.

If there is a release of a new version and as an experienced developer (might not be in my case Tongue) we can choose to download a fully compressed (not sure if this is the right word to use here) version with no commenting (or less commenting then normal), and this could probably include the option to include the framework guide (i have that in one folder by itself to make my life a little easier).
#29

[eluser]manilodisan[/eluser]
Size does not matter. Bad coding does...I don't see why the ellislab team thinks it different...Probably because they have a strong documentation which is true, however, code documentation is just another part of a good OS project.
#30

[eluser]outrage[/eluser]
I found this somewhere quite some time ago. Can't remember who came up with it though sorry.

Try making a MY_Controller.php like the example below and place it in application->libraries
It will help with code completion whatever IDE you use.

Code:
<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');

class MY_Controller extends Controller {

    /**
     * @var CI_Benchmark
     */
    var $benchmark;

    /**
     * @var CI_Calendar
     */
    var $calendar;

    /**
     * @var CI_Config
     */
    var $config;

    /**
     * @var CI_Email
     */
    var $email;

    /**
     * @var CI_Encrypt
     */
    var $encrypt;

    /**
     * @var CI_Ftp
     */
    var $ftp;

    /**
     * @var CI_Image_lib
     */
    var $image_lib;

    /**
     * @var CI_Input
     */
    var $input;

    /**
     * @var CI_Language
     */
    var $language;

    /**
     * @var CI_Loader
     */
    var $load;

    /**
     * @var CI_Output
     */
    var $output;

    /**
     * @var CI_Pagination
     */
    var $pagination;

    /**
     * @var CI_Parser
     */
    var $parser;

    /**
     * @var CI_Session
     */
    var $session;

    /**
     * @var CI_Trackback
     */
    var $trackback;

    /**
     * @var CI_Unit_test
     */
    var $unit;

    /**
     * @var CI_Upload
     */
    var $upload;

    /**
     * @var CI_Uri
     */
    var $uri;

    /**
     * @var CI_User_agent
     */
    var $agent;

    /**
     * @var CI_Validation
     */
    var $validation;

    /**
     * @var CI_Xmlrpc
     */
    var $xmlrpc;

    /**
     * @var CI_Xmlrpcs
     */
    var $xmlrpcs;

    /**
     * @var CI_Zip
     */
    var $zip;


    function MY_Controller() {
        parent::Controller();
    }
}
?>

EDIT:

Your controllers should then extend MY_Controller like this:

Code:
class Admin extends MY_Controller {

    function Admin()
    {
        parent::MY_Controller();    
    }




Theme © iAndrew 2016 - Forum software by © MyBB