Special offers now — see discounted courses.
day
:
hour
:
min
:
sec
See special offers
PHP: Object-Oriented Programming

PHP: Object-Oriented Programming

3h 54mIntermediate2017-11-17

Authors

Kevin Skoglund

Kevin Skoglund

Founder of NovaFabrica

Course details

PHP developers can benefit from the efficient, well-organized, reusable, and easy-to-understand code that object-oriented programming offers. In this intermediate-level course, Kevin Skoglund introduces object-oriented programming (OOP) principles for PHP. Kevin shows how to define a class, add properties and methods, and create new instances. He demonstrates how to use class inheritance to share, extend, and override class behavior, and how to control access to the properties and methods of a class. He explains the difference between static and late static bindings, and shows how to customize the PHP "magic" methods, which are triggered automatically. In the final chapter, he shows how to add object-oriented code to a real-world PHP website, so you can see OOP techniques in action.

Learning objectives
Defining classes
Calling methods
Class inheritance
Extending and overriding classes
Accessing and controlling access to properties and methods
Static properties and methods
Magic methods: constructor, destructor, and clone
Creating a PHP OOP project

Skills covered

PHPProgramming LanguagesOpen SourceSoftware DevelopmentDeep Dive (X:Y)

Concepts

0. Introduction

  • 01 - PHP - OOP techniques
  • 02 - How to use the exercise files

1. Overview and Project Set Up

  • 03 - What is OOP
  • 04 - Project set up

2. Object Basics

  • 05 - Define a class
  • 06 - Instances
  • 07 - Class properties
  • 08 - Class methods
  • 09 - Refer to an instance
  • 10 - Challenge - Properties and methods
  • 11 - Solution - Properties and methods

3. Class Inheritance

  • 12 - What is inheritance
  • 13 - Define a subclass
  • 14 - Extend and override
  • 15 - Challenge - Inheritance
  • 16 - Solution - Inheritance

4. Object Access Control

  • 17 - Visibility modifiers
  • 18 - Beware of overloading
  • 19 - Setter and getter methods
  • 20 - Challenge - Access control
  • 21 - Solution - Access control

5. Static Properties and Methods

  • 22 - The static modifier
  • 23 - Inherited static behaviors
  • 24 - Class constants
  • 25 - Refer to the parent class
  • 26 - Late static bindings
  • 27 - Challenge - Static references
  • 28 - Solution - Static references

6. Magic Methods

  • 29 - Constructor method
  • 30 - Constructor arguments
  • 31 - Destructor method
  • 32 - Clone method
  • 33 - Assignment by reference
  • 34 - Compare objects
  • 35 - Autoload undefined classes

7. A PHP OOP Project

  • 36 - Project introduction
  • 37 - Challenge - The bicycle class
  • 38 - Solution - The bicycle class
  • 39 - From instances to HTML
  • 40 - Read from a CSV file
  • 41 - Improve ParseCSV
  • 42 - From a CSV file to instances

Conclusion

  • 43 - Happy Coding

Related courses

Related learn paths

About us

LyndaKade is a leading learning platform that helps people learn business, software, technology, and creative skills to achieve personal and professional goals.

Phone numberAparat ChannelTelegram SupportTelegram ChannelInstagram Page

All rights to this site belong to LyndaKade.

Terms of Service|Privacy Policy

نماد الکترونیک enamad در صورت اتصال با آی‌پی داخل کشور، نمایش داده خواهد شد.
logo-samandehi - لوگو ساماندهی
zarinpal
zibal