Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

SymfonyCasts

OOP (Course 2): Services, Dependency Injection and Containers

via SymfonyCasts

Overview

Time to take things up a notch!

In this Course, we'll leverage what we learned in Course 1 to really start using what we know. We'll clean up old functions with new classes, learn a practice called dependency injection and organize our objects into something called a container. This is the course that really makes objects useful and sets us up for future stuff (inheritance, interfaces, etc).

So let's get serious:

  • Service Classes
  • Organize with private functions
  • Goodbye arrays, hello BattleResult
  • Objects passed by Reference
  • Query from the Database, but using Objects!
  • Dependency Injection!!!
  • Creating a Service Container

Do it!

Syllabus

  • Service Classes
  • An Army of Service Classes
  • Sharpening the Battle Result with a Class
  • Optional type-hinting & Semantic Methods
  • Objects are Passed by Reference
  • Fetching Objects from the Database
  • Handling the Object Id
  • Making only one DB Connection with a Property
  • OO Best Practice: Centralizing Configuration
  • OO Best Practice: Centralizing the Connection
  • Service Container
  • Container: Force Single Objects, Celebrate
  • Container to the Rescue

Taught by

Ryan Weaver and Leanna Pelham

Reviews

Start your review of OOP (Course 2): Services, Dependency Injection and Containers

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.