Namespaces and the use Statement

Video loading...

Join Drupalize.Me to watch this video

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

Log in Sign up
  • 0:07
    We all know the name of this class is BattleManager.
  • 0:11
    When we want to use it, we reference BattleManager.
  • 0:15
    No matter what we do, static or non-static,
  • 0:18
    if we want to work with this class we call it by its name, BattleManager.
  • 0:23
    Simple.
  • 0:25
    Why am I pointing out the painfully obvious?
  • 0:28
    Because we're about to make this className longer.
  • 0:31
    But maybe not how you'd expect.
  • 0:33
    We're going to use a namespace.
  • 0:36
    At first why namespaces exist might not be obvious.
Loading ...