Home arrow PHP arrow Building a Sample Application with Method Chaining and CodeIgniter

Building a Sample Application with Method Chaining and CodeIgniter

Definitely, building chainable class methods with PHP 5 is a process that can be mastered with minor effort, even for developers with only an average level of experience in using the object-oriented paradigm. Therefore, if you're a passionate PHP programmer who wishes to learn the key concepts that surround the implementation of method chaining in a painless fashion, then this group of articles is what you need.

TABLE OF CONTENTS:
  1. Building a Sample Application with Method Chaining and CodeIgniter
  2. Review: the abstract model class so far
  3. Adding functionality to the Users controller class
  4. Finishing the controller class with update and delete methods
By: Alejandro Gervasio
Rating: starstarstarstarstar / 2
December 03, 2009

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Welcome to the final part of a series that covers method chaining in PHP 5. In twelve tutorials, this series attempts to teach you the basics of building chainable class methods with PHP 5 and complements the corresponding theory with copious hands-on examples.

And now that you've come to this point, it's time to summarize the topics that were covered in the last tutorial. In that particular article I finished building a custom model library for the popular CodeIgniter framework, where most (not all) of its functionality relied on the definition and implementation of chainable methods. That speaks for itself about the convenience of using this programming approach.

It's valid to say, though, that this custom library would be pretty useless if I didn't show you how to utilize it in the context of a database-driven application. Therefore, this last installment of the series will be aimed at demonstrating how to build a simple PHP program with CodeIgniter that will perform CRUD operations on a simple MySQL table that will store data on some fictional users.

Now, it's time to stop talking and get our hands dirty building this basic - yet illustrative -- PHP program.



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

blog comments powered by Disqus
   

PHP ARTICLES

- PHP Closures as View Helpers: Lazy-Loading F...
- Using PHP Closures as View Helpers
- PHP File and Operating System Program Execut...
- PHP: Effects of Wrapping Code in Class Const...
- PHP: Building Concrete Validators
- Sanitizing Input with PHP
- Executing Shell Commands with PHP
- Handling File Data with PHP
- File Security and Resources with PHP
- ArrayObject PHP Class Examples
- ArrayObject PHP Class: An Introduction
- Getting File System Data with PHP
- PHP Tools for Working with the File and Oper...
- Working with the File and Operating System w...
- PHP Proxy Patterns: Completing a Blog


© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 4 - Follow our Sitemap

Dev Shed Tutorial Topics: