PHP Tutorial: Learn OOPs PHP for Beginners
Course Topic and complete OOP concepts given below:-
- OOP Basics Introduction
- $this keyword
- Constructor and Destructor
- Chaining Methods and Properties
- Access Modifiers – Public, Private and Protected
- Final Keyword
- Abstract Classes and Methods
- Static Methods & Properties
- Data Encapsulation
- Data Abstraction
- Magic Methods
- Type Hinting
- Dependency Injection
- Working with Objects
- Traits and Code Inclusion
- Auto Loading and Dynamic Calling
- S.O.L.I.D Object Oriented Principles
- Final Project 1 – Database class with OOP
- Final Project 2 – CRUD Operations with POST Class with OOP
- This course assumes that you have PHP basics knowledge or taken few beginners courses external or including on our website blog.
- You should know atleast how to run PHP code on your computer.
- Install Xampp or Mamp Server on you computer / laptop.
- Understanding English language is must, as this course will be in english language.
Why should I learn OOP?
Object Oriented Programming (OOP) is programming concept which brings the following advantages to this course:
- You logical group your code into Components.
- You build Small Components of code which can be reused.
- Components are extend or leverage from other Components.
- Simplify the complex concept into smaller Components.
- Extending the component, Reusing the Component, Hiding Features and many other benefits.
If you want to be senior developer or build website for business then you should know how to write in OOP.
Even when you use the 3rd Party Libraries they are built using OOP and without knowing this OOP it is really difficult to use 3rd Party Libraries as well.
Building your projects using OOP will be easy to extend and share by other developers as well.
How this course can help me learn OOP?
This course is designed to teach you OOP in two simple ways:
- Understand and Able to Explain OOP Concept.
- Implement OOP Concept using the real time examples.
This course will help you learn …
PHP Basics: Introduction
- What is Object Oriented Programming in PHP?
- What is Class?
- How to Define a Class, Properties and Methods.
- How to Define Objects and Use it.
- Write Methods with Parameters inside the Class.
- Apply the OOP Concept with Users, Bank and File Class.
- Simple Project to Calculate Employee Salary.
- Learn about the importance of $this keyword.
- How and When to use $this keyword.
- Write a Student Class by using the $this keyword.
- Learn What is Constructor and Destructor?
- Define and Use Constructor in a Class.
- Define and Use Destructor in a Class.
- Purpose of Constructor and Destructor.
- Implement Constructor and Destructor using File Class.
- Learn How to Chain Methods using Posts Class.
- Understand the most important concept of Access Modifiers – public and private.
- How Access modifiers help to restrict access to methods and properties in a Class.
- Understand What is Inheritance?
- How a Child Class Inherits from Parent Class.
- How a Child Class Own Methods and Properties.
- Learn about protected Access Modifiers.
- Overriding: Child Class Override Parent Class Methods and Properties
- Learn about Single and Multiple Inheritance and which one is supported.
- Implement Inheritance Concept using Course and Lecture Real Time example.
- Learn when to use the final keyword.
- Hiding: Prevent Child Class Overriding Parent Class Methods and Properties.
- Use final keyword using a Driver Class.
- Learn What is Interface?
- How to Declare and Implement Interface.
- Implement more than one Interface to Class.
- Use case of Interface and where to use them.
- Create Phone Interface and Learn how to implement it in real time.
- What is Abstract Classes and Methods?
- How to Declare Classes and Methods as Abstract.
- Abstract Class with Non-Abstract Methods.
- Use case of Abstract Class.
- Real time example of Abstract Class.
- What is Static Methods and Properties?
- Define and Access Static Methods and Properties.
- self:: Keyword.
- Use case of Static Methods and Properties.
- Real time Example of Static Methods and Properties.
- What is Polymorphism?
- Example of Polymorphism.
- Understand Data Encapsulation Concept.
- Do an Example of Data Encapsulation.
- Understand Data Abstraction Concept.
- Do an Example of Data Abstraction.
- Understand What is Overriding?
- Example of Overriding.
- Understand Difference between Overloading vs Overriding.
- What is Magic Methods?
- Work with _set and _get, _call, _toString and _debuginfo Magic Method.
- Learn What is Type Hinting?
- Example using Type Hinting Methods with Arrays
- Example using Type Hinting Methods with Objects
- Write a Posts Class to savePost() and fetchPosts() with Proper Type Hinting
- What is Namespaces?
- Define and Use Namespace
- Alias Name and Global Namespace
- Understand What is Dependency Injection?
- Example of Dependency Injection.
- Show an Example of Dependency Injection using University and Student.
- Learn to Clone Objects, Serialize Objects, Cache Objects, Comparing Objects and Iterating Objects.
- Understand What are Traits?
- Define and Use Traits.
- Multiple Traits in one Class.
- Create Trait for Files Operation and use it in Posts Class.
- Understand What is AutoLoading?
- Example of Autoloading Functions.
- Example of Autoloading Namespace.
- Learn about S.O.L.I.D – Object Oriented Principles.
- Projects with Database Class, Students Class and University Application Class.
- To Be Continued …
Trust me we will learn more than what we think before even starting here.