<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;"><br>I've been looking for a solution to reducing the size of my controller by making multiple controllers.  <br><br>I think I may have found a solution.  It's a little complex, however I get the gist of it. Your thoughts?<br><br>https://gist.github.com/4157418<br><br><br><br>------------------------<br>
Keith Smith<br><br>--- On <b>Sun, 12/2/12, Eric Cope <i><eric.cope@gmail.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Eric Cope <eric.cope@gmail.com><br>Subject: Re: OT: CodeIgniter Routing<br>To: "Main PLUG discussion list" <plug-discuss@lists.phxlinux.org><br>Date: Sunday, December 2, 2012, 10:28 AM<br><br><div id="yiv302916591">That's what I do. It makes it much easier. It makes testing easier too.<div>I made it when i extend the class, the table name is set, then I use late static binding to reference it in the base class...</div><div><br></div>

<div>Eric</div><div class="yiv302916591gmail_extra"><br><br><div class="yiv302916591gmail_quote">On Sun, Dec 2, 2012 at 10:26 AM, Tom Haws <span dir="ltr"><<a rel="nofollow" ymailto="mailto:tom.haws@gmail.com" target="_blank" href="/mc/compose?to=tom.haws@gmail.com">tom.haws@gmail.com</a>></span> wrote:<br>

<blockquote class="yiv302916591gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I have a question/thought.<br><br>If a lot of the CRUD is repetitive (similar table structures), would it be appropriate to create a models/generic_model.php that has the generic CRUD functions/SQL and a set_table method or some other way of passing it a table name to enhance DRY programming?<span class="yiv302916591HOEnZb"><font color="#888888"><br>


<br>Tom<br>
</font></span><br>---------------------------------------------------<br>
PLUG-discuss mailing list - <a rel="nofollow" ymailto="mailto:PLUG-discuss@lists.phxlinux.org" target="_blank" href="/mc/compose?to=PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>
To subscribe, unsubscribe, or to change your mail settings:<br>
<a rel="nofollow" target="_blank" href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a><br></blockquote></div><br></div>
</div><br>-----Inline Attachment Follows-----<br><br><div class="plainMail">---------------------------------------------------<br>PLUG-discuss mailing list - <a ymailto="mailto:PLUG-discuss@lists.phxlinux.org" href="/mc/compose?to=PLUG-discuss@lists.phxlinux.org">PLUG-discuss@lists.phxlinux.org</a><br>To subscribe, unsubscribe, or to change your mail settings:<br><a href="http://lists.phxlinux.org/mailman/listinfo/plug-discuss" target="_blank">http://lists.phxlinux.org/mailman/listinfo/plug-discuss</a></div></blockquote></td></tr></table>