CodeIgniter Forums

Full Version: Aptana Studio code assist
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I've found some instructions for getting this in Aptana Studio IDE.

For instance here: http://taggedzi.com/articles/display/aut...eigniter-2

But i don't like this approach since i need to have that "base" project open. I was wondering if i can put those in actual core classes(model and controller) in the actual colledge project that i am working on, so that those look like this:
Code:
<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package        CodeIgniter
* @author        EllisLab Dev Team
* @copyright        Copyright (c) 2008 - 2014, EllisLab, Inc.
* @copyright        Copyright (c) 2014 - 2015, British Columbia Institute of Technology (http://bcit.ca/)
* @license        http://codeigniter.com/user_guide/license.html
* @link        http://codeigniter.com
* @since        Version 1.0
* @filesource
*/

// ------------------------------------------------------------------------

/**
* CodeIgniter Application Controller Class
*
* This class object is the super class that every library in
* CodeIgniter will be assigned to.
*
* @package        CodeIgniter
* @subpackage    Libraries
* @category    Libraries
* @author        EllisLab Dev Team
* @link        http://codeigniter.com/user_guide/general/controllers.html
*/
class CI_Controller {
     /**
     * @var CI_Config
     */
    var $config;
    /**
    * @var CI_DB_active_record
    */
    var $db;
    /**
    * @var CI_Email
    */
    var $email;
    /**
    * @var CI_Form_validation
    */
    var $form_validation;
    /**
    * @var CI_Input
    */
    var $input;
    /**
    * @var CI_Loader
    */
    var $load;
    /**
    * @var CI_Router
    */
    var $router;
    /**
    * @var CI_Session
    */
    var $session;
    /**
    * @var CI_Table
    */
    var $table;
    /**
    * @var CI_Unit_test
    */
    var $unit;
    /**
    * @var CI_URI
    */
    var $uri;
    /**
    * @var CI_Pagination
    */
    var $pagination;

    private static $instance;
    /**
     * Constructor
     */
    public function __construct()
    {
        self::$instance =& $this;

        // Assign all the class objects that were instantiated by the
        // bootstrap file (CodeIgniter.php) to local class variables
        // so that CI can run as one big super object.
        foreach (is_loaded() as $var => $class)
        {
            $this->$var =& load_class($class);
        }

        $this->load =& load_class('Loader', 'core');

        $this->load->initialize();
        
        log_message('debug', "Controller Class Initialized");
    }

    public static function &get_instance()
    {
        return self::$instance;
    }
}
// END Controller class

/* End of file Controller.php */
/* Location: ./system/core/Controller.php */

Also if anyone has any better way, please suggest. Big Grin