Chapter 7. CodeIgniter and Objects

In this chapter we will see how CodeIgniter actually works, "under the hood". This chapter will help us understand why things happen in certain ways, as opposed to just knowing that they do.

Objects confused us, when we started using CodeIgniter. Coming to CodeIgniter through PHP 4, which is a procedural language, and not an object-oriented (OO) language. We duly looked up objects and methods, properties and inheritance, and encapsulation, but our early attempts to write CI code were plagued by the error message "Call to a member function on a non-object". We saw it so often that we were thinking of having it printed on a T-shirt.

To save the world from a lot of boring T-shirts, this chapter covers the way in which ...

Get CodeIgniter 1.7 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.