Archived video

This video is archived and won't be updated. We're keeping it online for now as a courtesy.

Alternate resources: 

Symfony Autoloading

Video loading...

Transcripts: 
Transcript language code: 
eng

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:05
    with Leanna Pelham
  • 0:09
    Autoloading.
  • 0:10
    It's like plumbing.
  • 0:12
    You forget it's there, but when it's gone,
  • 0:14
    well-- let's just say you have to go outside a bit more often.
  • 0:19
    Autoloading is the magic that lets us use classes without needing
  • 0:22
    to require or include the file that holds them first.
  • 0:26
    We used to have include statements everywhere.
  • 0:28
    And, well, it was terrible.
  • 0:31
    But an autoloader has a tricky job.
Loading ...

Symfony Autoloading

Loading...

Autoloading is the magic that lets us use classes without needing to require or include the file that holds them first. An autoloader has a tricky job: given any class name, it needs to know the exact location of the file that holds that class. In many modern projects, including ours, Composer handles this for us, and there are two pieces to understanding how it figures out what file a class lives in. In this lesson we're going to get an overview of how directory structures and namespaces make autoloading work.

Downloads: 
Log in or sign up to download companion files.
Additional resources: