The ServiceLocator
is for resolving dependencies in your code when needed. There you don't want to use a reference to the container as that would be totally against the purpose of having losely coupled code.
Personally I agree with those that say that a service locator itself is an anti pattern and should be avoided whenever possible by injecting everything that is possible.