PHP
  Home arrow PHP arrow Method Chaining: Adding More Selecting Methods to the CodeIgniter Library
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
iPad news and developer info.
Ads by affinity 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
VPS Hosting 
Forums Sitemap 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PHP

Method Chaining: Adding More Selecting Methods to the CodeIgniter Library


By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 1
    2009-11-18


    Table of Contents:
  • Method Chaining: Adding More Selecting Methods to the CodeIgniter Library
  • Review: the AbstractModel class's source code
  • Building the SELECT MIN, SELECT AVG and SELECT SUM parts of a SQL statement with chainable methods
  • The AbstractModel class's updated source code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Summary: In this ninth part of an 11-part series on method chaining, I will add three new chainable methods to the custom CodeIgniter model class we built in previous parts. You should find this a straightforward process, especially if you have a decent background in this framework’s database class.

    Method Chaining: Adding More Selecting Methods to the CodeIgniter Library
    (Page 1 of 4 )

    While it’s not going to change forever the way that PHP developers build their web applications, method chaining is a solid programming approach that permits them to build classes that have highly compact and modular interfaces.

    So, if you’re always looking for new ways to improve your existing development skills and want to learn how to incorporate chainable methods into your PHP programs, then you should read this series of articles. In it you’ll find a guide that will show you how to accomplish this in a truly friendly fashion.

    However, if you’ve been a patient reader and have already read the previous installments, then you now have a solid background in creating chainable methods with PHP 5. In those tutorials I not only explained how to implement this kind of method, but how to use them for developing a custom model library for CodeIgniter.

    Now, speaking more specifically, in the preceding article I added a couple of chainable methods to the aforementioned CodeIgniter model for building the SELECT and SELECT MAX parts of a SQL query. They expanded the model’s current functionality.

    Nonetheless, it’s fair to say that there is still plenty of room for expanding the capabilities of the model. Therefore, in the course of this ninth part of the series I’m going to code a couple of additional chainable methods to it that will be tasked with building the SELECT MIN, SELECT SUM and SELECT AVG parts of a SELECT SQL statement respectively.

    So, want to see how these brand new methods will be coded? Then, get rid of the preliminaries and start reading right now!



     
     
    >>> More PHP Articles          >>> More By Alejandro Gervasio
     

       

    PHP ARTICLES

    - PHP Excel Customizations: Working with Formu...
    - MVC and the Zend Framework
    - PHP: Rendering Web Pages Using the Composite...
    - PHP: Creating Dynamic Web Pages with the Com...
    - Secure Encrypting and Decrypting for Your PH...
    - PHP: Creating Single View Objects with the C...
    - PHP: View Object Collections and the Composi...
    - Securing Your PHP Website
    - Determine Link Relevance and Unique Class C ...
    - PHP Composite View Design Pattern: Introduci...
    - Facebook PHP API Applications: A Second Look
    - Secure PHP Programming
    - Facebook PHP API Applications: Basic Introdu...
    - SOAP Servers and Web Services
    - Using XPath, SOAP, and More with Web Services


    Code Analysis Tools
    Enterprise code analysis tools that deliver quality and reliable code

     


     


    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 1 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek