Object Orientation in PHP
4.8 (54 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
205 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Object Orientation in PHP to your Wishlist.

Add to Wishlist

Object Orientation in PHP

Fully understand object oriented analysis, design and programming from the ground up.
4.8 (54 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
205 students enrolled
Created by Lawrence Turton
Last updated 3/2016
Current price: $10 Original price: $20 Discount: 50% off
5 hours left at this price!
30-Day Money-Back Guarantee
  • 5 hours on-demand video
  • 8 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • APIE (Abstraction, Polymorphism, Inheritance & Encapsulation)
  • Object oriented analysis, design & programming
  • UML or Unified Modelling Language
  • Sequence diagrams
  • Class syntax of PHP
View Curriculum
  • Have general knowledge of the PHP language but not required for OOA or OOD

Learning object oriented programming may seem like a chaw but in reality once learnt it's not difficult. However many programmers learn object orientation programming instead of the whole object orientation process, for example what do we mean by object orientation? What does the APIE acronym stand for and do we understand all concepts of this acronym? Those who may even have a general knowledge of object orientation programming may want to take this course because it'll give a higher definition of object orientation and all concepts that surround it. To truly understand how to program in an object oriented manner then we must first understand all there is to know about the concepts, ideologies and fundamental understanding not just the syntax of any one language.

If you just know how to program object oriented then that will not cut it. What happens when you need to map out an application are you using UML and are you using it correctly? Everything we do in the programming world is for real world use so understanding the syntax only or understanding object orientation in a general way will not cut in large scale projects. So those programmers who may have been exposed to object orientation syntax may find this course of some use and don't for object oriented analyse and design don't refer to any programming language. Also new comers will definitely learn a boat load from this course in the simplest manner possible right from the start even if you don't want to do the programming part.

This course includes lectures that break subjects down like abstraction, polymorphism, inheritance and encapsulation in a simplified spoon fed manner for anyone to understand from beginner or even an experienced programmer who wants to know more about the object oriented fundamentals.

Who is the target audience?
  • Have a full understanding of the concepts behind OO not just programming
  • People who want to learn the full process of OO
  • Want further understanding of certain aspects of OO
  • Learn OO PHP syntax that can be generalised to other programming languages as well
Compare to Other PHP Courses
Curriculum For This Course
30 Lectures
Basic OOP
7 Lectures 41:49

Welcome to this course that'll teach you about object oriented analysis, design and programming. This course isn't just about learning syntax, it'll teach you the why behind lots of commonly used terminologies and phrases used in OOP. Also the concepts will be explained even how to define objects themselves.

Preview 03:05

Defining an object can be tricky, so we need to know the very definition of an object. How do you define an object and then how is it translated into the programming world.

Preview 13:39

A class is used to build an object in programming. But why would you want to use classes? Why do they exist and have purpose in programming? Well we're about to find out.

Preview 06:58

Abstraction is the necessary process of simplifying our program's. It's a principle that is carried all throughout programming and not just object oriented programming. As programmers we must simplify and the best way to do that is abstraction.

Preview 02:29

Polymorphism may sound like a big word but all it really means is 'many forms'. For example if you use the plus '+' symbol you can add two numbers together and likewise using the same plus operator two strings will be concatenated together.


Inheritance is a form of instantiating a sub class with that class then pulling in all the parents' properties and method's. Inheritance has a lot to do with abstraction.


Encapsulation is grouping properties and methods together in an object, it's essentially the container that keeps everything together. However this is not the only one purpose of encapsulation. It also involves black boxing which is hiding certain properties and methods to further ensure our application works the way it should.

Object Oritented Analysis & Design
4 Lectures 30:01

Object oriented analysis is very important when starting a new project. Missing this stage will be disastrous for large scale project's and even small ones if not done properly. Also over doing this stage will in essence hamper you so finding the right balance is good. Once the data analysis has been done we can then move onto the next step which is designing the program.

Object Oriented Analysis

The universal modelling language is very important for diagramming the class structure of a program. This lecture will give you a brief overview as you've already seen some UML in prior lectures.

What is UML

UML is simple but allows for complex modelling. However don't go too far with UML lest it become burdensome instead of a tool to help produce a good program structure. Mainly your UML will be simple with standard inheritance relationships. However you can also show aggregation and composition relationships as well with UML, these are the essentials and pretty much should cover all UML you really need to know.

UML relationships, aggregation and composition

Sequence diagrams are hear to explain to you as a programmer, or your client, how the user will interact with your program. If you or your client is unsure about how a certain scenario will play out then you'll need to demonstrate it with this useful digram making it as detailed as possible. Please don't create a sequence diagram for every scenario that could happen in your program; as this would simply waste time making diagrams for things you already know.

Sequence Diagrams
OOP Members
3 Lectures 19:09

Classes are made up of many member's, a member being either a property or method. However for each member we can set the access level, ensuring a more robust application structure.

Public, private & protected

Overriding is to do with the way in which your members work within inheritance. For example a sub class can have a member that'll override or overwrite the parent member with the same name. This can be very useful for abstraction and makes our application more flexible when creating objects.

Overriding Members

Shared, class level or what's more commonly known as a static member are shared across all instances (objects) of that class. Also a static member can be accessed in memory without even creating a single instance (object) from that class.

Static / Shared / Class level members
Advanced OOP
3 Lectures 10:57

To put it simply a concrete class can be instantiated, which means we can create an object from that class. An abstract class is a class that we cannot create an object directly from. An abstract class is there purely for inheritance.

Concrete & abstract classes

Interfaces are a lot like contracts for our application. It ensures that our classes that implement a certain interface will have the methods required. This can be useful later on for ensuring we can check this object has that agreement ensuring we can call that method.


Traits are important in single inheritance languages. Most of the time there is no need for multiple inheritance however in programming languages like PHP that only support single inheritance; traits can be useful to solve the problem of code reuse.

PHP Bank Account Project
13 Lectures 03:15:05

Before we begin this project let's start at the design phase. In reality you would go to the analysis stage and gather all data together and then design the application.

Bank account UML diagram

Firstly for code reuse, and dependancy on for the sub classes, we can focus on the abstract class and create it first.

Preview 16:08

Once we have created the abstract class we can now create the sub classes. We also will create interfaces for the penalty method to be called on certain accounts.

Creating sub classes part one

Next we want to finish off creating our concrete classes. We need to finish explaining the withdraw method and then complete the concrete classes.

Creating sub classes part two

Now lets add a trait and then use that trait with the bank account plus for the debit and savings accounts. This'll allow us to create a more robust application.

Trait & interface

Now we have our classes we can call the sub classes. This will then create instances of the sub classes and allow us to perform actions on those instances or objects.

Instantiating classes and running the program

Next we'll take a look at running our program even further to find out more about instantiating classes and producing instances of a class (objects) at runtime. Also we'll review the process of checking for a certain interface which guarantees certain methods are able to be run on our object's.

Running the program further

Using interfaces at runtime is very important as it'll allow us to check to make sure an object has the correct methods that we know can be called on this object. This way we use interfaces for class integrity and avoid runtime errors.

Using interfaces at runtime

When instantiating classes sometimes we need special property values each time we instantiate a new object. We can do this via a constructor function.

Class constructor's

In this lecture we'll add a constructor function to our abstract bank account class. Then I'll link up the parent constructor to the sub class constructor.

Inherited class constructor's

Just as an example of static properties and methods in PHP. Also constants are in fact compiled to memory like static properties however they are not variable, they can only be set once and cannot change through the lifetime of the program.

Static properties, methods and constants

Thank you for watching this lecture, I hope you have learned a lot and review this course periodically to refresh your knowledge on OOA, OOD and OOP.

Conclusion and Goodbye

Bonus Lecture: Discount course
About the Instructor
Lawrence Turton
4.5 Average rating
9,790 Reviews
99,092 Students
7 Courses
Technical Instructor

Lawrence Turton works as a web developer & graphic designer specialising in HTML, CSS, jQuery, UI & UX design. He has previously worked with Fifteendesign producing websites, iPhone and Android apps and started his own agency in 2010 called Elite Web Design. During that time Lawrence has established a wide range of clients from blue chip companies to large corporations. From a young age he was an online instructor and started to work with two of the leading online training specialists Cartoonsmart and Envato. Lawrence always created projects involving designs in Photoshop and bringing his creations to life by coding them with web technologies. This gives him a unique perspective into real world projects from start to finish and a wealth of information for new comers to the web industry.