#41 new
S. Shehzed

Superfluous behavior and non-DRY of calling classes through constructor too many times

Reported by S. Shehzed | March 8th, 2011 @ 07:20 PM | in v0.20

Each App_Model class has these same lines:

include(APPPATH.'config/databases.php');
$this->base = $this->load->database($db['base'], TRUE); $this->granary = $this->load->database($db['granary'], TRUE);

This means App_Model, and Comp classes all load dbs. But those classes are never used on the ground. They are there for structure as basically abstract or skeleton-like classes.

Also, there is the whole repeating of those three lines for each App_Model (so repeated for every module). Should bump up the three lines to the Parent_App_Model class, but make it conditional so only Task children classes go through those lines. Parent_App_Model should NOT go through the lines itself.

No comments found

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

GOT COLD BEER! POUR BEER IN FROSTY MUG! DRINK BEER! REPEAT! HOPE COOKS SOURCE NO STEAL DRUNK HULK RECIPE!

Shared Ticket Bins

People watching this ticket

Pages