YoVDO

OOP (course 4): Static methods, Namespaces, Exceptions & Traits! Woh!

Offered By: SymfonyCasts

Tags

Object-oriented programming Courses

Course Description

Overview

Finally, we can really unload and see all the cool OOP stuff that we haven't covered yet. These are the last missing pieces that are standing between you and understanding any OO code you meet.

  • Static methods
  • Class constants
  • Namespaces
  • Autoloading (RIP require statements)
  • __toString & the other magic functions
  • Treat that $object[1] like an array (ArrayAccess)
  • Throwing and catching a baseball Exceptions
  • Traits! Horizontal code re-use
  • Composition Versus Inheritance: Dressing your classes for success

Finally, you're going to start to see some serious pay-off from these new, crazy OO skills you've got. In this tutorial, OO is here to impress us. Dig in.


Syllabus

  • The Wonder of Class Constants
  • Static Methods
  • Static or Non-Static Methods?
  • Namespaces make Class Names Longer
  • Autoloading Awesomeness
  • More Fun with use Statements
  • Namespaces and Core PHP Classes
  • Composer Autoloading
  • Throwing an Exception (and a Party)
  • Different Exception Classes
  • Magic Methods: __toString() __get, __set()
  • ArrayAccess: Treat your Object like an Array
  • IteratorAggregate: Loop over an Object!?
  • Traits: "Horizontal" Reuse
  • Object Composition FTW!

Taught by

Ryan Weaver and Leanna Pelham

Related Courses

Introduction à la programmation orientée objet (en Java)
École Polytechnique Fédérale de Lausanne via Coursera
C++ For C Programmers, Part A
University of California, Santa Cruz via Coursera
Introduction to Programming for Musicians and Digital Artists
California Institute of the Arts via Coursera
Beginning Game Programming with C#
University of Colorado System via Coursera
Paradigms of Computer Programming
Université catholique de Louvain via edX