Book Image

PhpStorm Cookbook

By : Mukund Chaudhary
Book Image

PhpStorm Cookbook

By: Mukund Chaudhary

Overview of this book

Table of Contents (16 chapters)
PhpStorm Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Cooking with Symfony


Symfony is a PHP web application framework for MVC applications available as free software and released under the MIT license.

To begin working with Symfony, you need to install Symfony on your local machine (also known as your local server). Life never lets you breathe easy. You have to choose from two (or more) paths to proceed. So is the case with PhpStorm.

Getting ready

Change often leads to confusion, so it is better to make few changes in the Symfony directory structure and jump to create a new controller. You create a new controller class inside the directory <Project-Root>/src/Acme/DemoBundle/Controller. Name it CookingController.php. Here are a few rules to follow:

  • By default, you should create a controller with the suffix Controller in the name

  • Each controller should extend the class Controller that is defined in the namespace Symfony\Bundle\FrameworkBundle\Controller\Controller namespace

  • The controller should be defined in the namespace Acme\DemoBundle...