In this lesson you'll learn how to configure and control how services from a bundle behave.
Additional resources
In this lesson you'll learn how to add a cache service to your Symfony 3 app.
In this lesson you'll learn how to further configure DoctrineCacheBundle in your Symfony 3 app.
In this lesson you'll learn about how you can set up configuration for your app depending on the environment—development, production or whatever else you might have.
Additional resources
In this lesson we'll continue to explore the configuration files for our "dev" and "prod" environments.
Additional resources
In this lesson you'll learn how to configure settings for specific environments. Here we'll disable caching for the dev environment, so that caching is enabled only for the prod environment.
Additional resources
In this lesson you'll learn about some special variables called parameters that are available in configuration files for Symfony. We'll explore already existing parameters as well as learn how to create a new parameter.
Additional resources
In this lesson you'll learn how to use the extra special parameters baked right into Symfony. These particular parameters can be super useful, so let's dive right in and learn all about special parameters in Symfony.
In this lesson you'll learn how to master route configuration loading and load the routes you want from certain bundles.
Ready for more Symfony 3? Check out the next series: Symfony 3: Level up with Services and the Container.
In this lesson, we'll explore what problems a services architecture can solve. You'll learn how services can unlock a bunch of powerful features for you in Symfony 3.
New to Symfony 3 or need a brush up on Symfony concepts? Check out these series first and then head back here to dive into Services and the Container.
Note: To set up the project and code along, see the instructions in start/README.md.
In this lesson, we'll move code out of the Controller and into a new class. You'll learn how to create this new service class and refactor the code that you took out of the Controller to work in this new context.
In this lesson, you'll learn about the dependency injection workflow and refactor our code to inject the dependency.
In this lesson you'll learn how use type-hinting to make your code more portable—and readable, too.
In this lesson, you'll learn how to register your service in the container so that you can can access it in your class.
In this lesson you'll inject cache service, applying what we've already learned about dependency injection and type-hinting as we refactor the code in our evolving app.
In this lesson, you'll learn how to extend Twig and create a Twig extension service to use in our Symfony 3 app.
In this lesson, we'll add tags to our services YAML file so that Twig knows about our new Twig extension. We'll discuss the reason behind tags and refactor our service with our new understanding of dependency injection tags!
In this lesson you'll learn what happens when you set autowire
to true when you register your service.
In this PHP tutorial, you'll get the project files up and running and learn all about class constants in object-oriented PHP.
If you're serious about getting really good at this stuff, code along with me. To do that, download the source code from this page, unzip it, and move into the start directory. When you do that, you'll have the same code that I have here. Open up the README file and follow the instructions inside to get things setup.
When that's done, open your favorite terminal application, move into the directory, and — like we've done in the previous courses — start the built-in php web server by running:
php -S localhost:8000
This is a great server to use for development. Then, in our browser, we can go to http://localhost:8000. Here is our beautiful Battles app!
Additional resources
Introduction to Object-Oriented PHP (Drupalize.Me)
Object-Oriented PHP Part 2 (Drupalize.Me)
Object-Oriented PHP Part 3 (Drupalize.Me)
In this PHP tutorial, you'll be introduced to static methods, the self
keyword and how they are used.
Additional resources
Object-Oriented PHP (topic) (Drupalize.Me)