EllisLab text mark
Advanced Search
     
I want to contribute to CodeIgniter!
Posted: 14 November 2012 03:07 PM   [ Ignore ]
Avatar
Joined: 2011-08-08
524 posts

Hi guys.

As a CodeIgniter user.
I wanted to help improve this great framework.
But I don’t know how the inner of CI works.
Any tutorial?, or Documents?,
or anyone would like to explain to me,
how the inner CI engine works?
I know how to fork it from github and push it back.

Thanks again in advanced.

 Signature 

Stick with it, practice it and have fun with it.

 
Posted: 14 November 2012 04:24 PM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Joined: 2011-02-23
882 posts

Just perform this function in your head:

function understand_codeigniter()
{
  $index 
= include('index.php');
  
  for ( 
$line 1; ! end_of_codeigniter($line); $line++ )
  
{
    read_and_understand_line
($index[$line]);
  
}
}

function read_and_understand_line($line)
{
  
if ( $other_file line_mentions_other_file($line) )
  
{
    open
($other_file);
    
    for ( 
$line 1; ! end_of_codeigniter($line); $line++ )
    
{
      read_and_understand_line
($other_file[$line]);
    
}
  }
}

function line_mentions_other_file($line)
{
  $matches 
= array();
  
  if ( 
regexp('(include|require)((\_once)?\(.+\))'$line$matches) )
  
{
    
return $matches[0];
  
}
  
  
return FALSE;

It’s a mixture of PHP and abstract programming language. You’d better not execute that, it will not work.

But in other words: You want to understand CI? Then open index.php and read and understand every single line of it. Wherever index.php mentions another file, open this file and read and understand it. Do this until either you fully understood CI or you’re at the end of files to look at. If the latter happens first, you should start all over again wink

Sounds harsh, but that’s how I learned CI and what a lot of other people answer for the same question. The best tutorial can only teach you how to use CI, but to understand CI you need to look at the source - which fortunately is open-source wink

 Signature 

ignited Community Framework (WiP)  |  Read the User’s Guide. It won’t bite.

STOP! Before posting your questions, remember the WWW Golden rule:
What did you try? What did you get? What did you expect to get?

CI example .htaccess

 
Posted: 14 November 2012 07:11 PM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2011-08-08
524 posts

@philtem

I thought there is a documentation that will explain to me the SHORTCUT.
Anyways I will do what you said.

By the way do you also contribute in github phil?

 Signature 

Stick with it, practice it and have fun with it.

 
Posted: 15 November 2012 06:46 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2012-01-09
117 posts

There is an application flow diagram in the docs that might help you: http://ellislab.com/codeigniter/user-guide/overview/appflow.html
Also, there’s a contribution guide on GitHub, although not related to the code logic: https://github.com/EllisLab/CodeIgniter/blob/develop/contributing.md

For the rest you will need to go through the code, there isn’t any shortcut.