Example of a way to implement the State design pattern in a Symfony2 project