You are previewing PhpStorm Cookbook.
O'Reilly logo
PhpStorm Cookbook

Book Description

Discover over 80 recipes to learn how to build and test PHP applications efficiently using the PhpStorm IDE

In Detail

PhpStorm is a commercial, cross-platform IDE for PHP. It provides an intelligent editor for PHP, HTML, and JavaScript with on-the-fly code analysis and automated refactoring for PHP and JavaScript code.

In this book, you will learn about accessing project files, maximizing and reordering views, and editors. Going ahead, you will learn how to access elements, search code, compare files, and integrate frameworks. After gaining in-depth knowledge of testing and debugging, you will learn about PHP development, refactoring and building applications with ease of handling, and integrating frameworks. You will also test and debug them using PhpStorm and then learn how to use Phing and plugins. By the end of this book, you will have learned all about Phing and cooking plugins.

What You Will Learn

  • Modify or customize the views and editors quickly
  • Learn about the basics of PHP development including class, methods, and getters/setters
  • Perform refactoring of elements such as renaming, copying, and moving
  • Integrate frameworks using PhpStorm to generate Models, Views, and Controllers
  • Use a CVS repository to commit files and check out projects using PhpStorm
  • Find out more about the use of PhpStorm in a team
  • Learn about safe deployment using Phing and PhpStorm
  • Create plugins getter/setter methods, exception breakpoints, and CVS repositories
  • Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

    Table of Contents

    1. PhpStorm Cookbook
      1. Table of Contents
      2. PhpStorm Cookbook
      3. Credits
      4. About the Authors
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why subscribe?
          2. Free access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Sections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Cooking with PhpStorm
        1. Introduction
        2. Showing/hiding views
          1. How to do it...
          2. How it works...
        3. Customizing a view
          1. How to do it...
          2. How it works...
        4. Accessing any project file
          1. Getting ready
          2. How to do it...
          3. How it works…
        5. Maximizing views and editors
          1. How to do it...
        6. Going back to the previous editor
          1. Getting ready
          2. How to do it...
          3. There's more…
        7. Going back to the previous edit location
          1. Getting ready
          2. How to do it...
        8. Linking views to editors
          1. How to do it...
        9. Creating a key binding
          1. How to do it...
          2. How it works...
        10. Creating a bookmark
          1. How to do it...
        11. Restoring deleted resources
          1. Getting ready
          2. How to do it...
          3. How it works...
        12. Customizing with PhpStorm
          1. Getting ready
          2. How to do it...
          3. See also
        13. Adding an include path
          1. Getting ready
          2. How to do it...
        14. Excluding unwanted directories from the index
          1. Getting ready
          2. How to do it...
          3. How it works…
        15. Using code completion
          1. Getting ready
          2. How to do it...
          3. How it works...
      9. 2. PHP Development
        1. Introduction
        2. Creating a PHP project using Composer
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Creating an empty project
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Reusing an existing project
          1. Getting ready
          2. How to do it...
        5. Creating a new PHP class
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Creating a new PHP method
          1. Getting ready
          2. How to do it...
          3. How it works...
        7. Adding the getter/setter methods
          1. Getting ready
          2. How to do it...
          3. How it works...
        8. Creating delegate methods
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Surrounding code with control structures
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Finding the matching brace
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Wrapping string
        11. Commenting out a section of code and PHPDoc
          1. Getting ready
          2. How to do it...
          3. How it works...
        12. Creating a working set
          1. Getting ready
          2. How to do it...
        13. Creating TODO tasks
          1. Getting ready
          2. How to do it...
          3. How it works...
      10. 3. Refactoring and Building
        1. Introduction
        2. Renaming elements
          1. How to do it...
            1. Renaming a directory
            2. Renaming a class
          2. How it works...
          3. There's more...
            1. Renaming a method
            2. Renaming member variables
          4. See also...
        3. Copying elements
          1. How to do it...
          2. How it works...
          3. There's more...
            1. Copying a class
        4. Moving elements
          1. How to do it...
            1. Moving a directory
            2. Moving a class
        5. Moving a method
          1. How to do it...
        6. Moving a variable
          1. How to do it...
        7. Deleting elements
          1. Getting ready
          2. How to do it...
          3. How it works…
        8. Searching code in a project
          1. Getting ready
          2. How to do it...
          3. How it works…
          4. There's more...
        9. Comparing files
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Restoring elements using comparison
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        11. Setting the run configuration
          1. How to do it...
          2. How it works...
          3. There's more...
        12. Running your code
          1. Getting ready
          2. How to do it...
          3. How it works…
      11. 4. Integrating Framework
        1. Introduction
        2. Cooking with Symfony
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Directory structure of Symfony
        3. Creating a controller with Symfony
          1. How to do it...
          2. How it works...
        4. Creating a model with Symfony
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Creating a view with Symfony
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Creating a model with the Yii framework
          1. How to do it...
          2. How it works...
        7. Creating a controller with the Yii framework
          1. How to do it...
          2. How it works...
        8. Creating a view with the Yii framework
          1. How to do it...
          2. How it works...
        9. Creating a model with the Zend framework
          1. How to do it...
          2. How it works...
        10. Creating a controller with the Zend framework
          1. How it works...
        11. Creating a view with the Zend framework
          1. How to do it...
          2. How it works...
          3. There's more...
      12. 5. Testing and Debugging
        1. Introduction
        2. Installing PHPUnit
          1. Getting ready
          2. How to do it...
          3. How it works...
        3. Test case in PHPUnit
          1. How to do it...
          2. How it works...
        4. Testing an application with PHPUnit
          1. How to do it...
          2. How it works...
        5. Starting a debugging session
          1. Getting ready
          2. How to do it...
          3. How it works...
        6. Setting a breakpoint
          1. How to do it...
          2. How it works...
        7. Configuring breakpoint conditions
          1. How to do it...
          2. How it works...
        8. Creating exception breakpoints
          1. How to do it...
          2. How it works...
        9. Stepping through your code
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Running to a line of code selected
          1. How to do it...
          2. How it works...
        11. Watching expressions and variables
          1. How to do it...
          2. How it works...
        12. Changing code on the fly
          1. How to do it...
          2. How it works...
        13. Code coverage in PhpStorm
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more…
            1. Purpose of code coverage
      13. 6. Using PhpStorm in a Team
        1. Introduction
        2. Getting a VCS server
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        3. Creating a VCS repository
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Connecting PhpStorm to a VCS repository
          1. Getting ready
          2. How to do it...
        5. Storing a PhpStorm project in a VCS repository
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        6. Committing files to the VCS repository
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Updating code from a VCS repository
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        8. Synchronizing your code with the VCS repository
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Examining the VCS repository
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Checking projects out of a VCS repository
          1. Getting ready
          2. How to do it...
          3. How it works...
        11. Creating code patches
          1. Getting ready
          2. How to do it...
          3. How it works...
        12. Creating VCS tags or branches
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        13. Creating a task for the team
          1. Getting ready
          2. How to do it...
          3. How it works...
      14. 7. PhpStorm and Phing
        1. Introduction
        2. Connecting Phing and PhpStorm
          1. How to do it...
          2. How it works…
          3. There's more…
        3. Catching Phing build file syntax problems
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        4. Building a PhpStorm application using Phing
          1. Getting ready
          2. How to do it…
          3. How it works…
        5. Using a different build file
          1. How to do it…
          2. How it works…
        6. Doing wonders with Phing
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
        7. Using the Phing build view
          1. How to do it…
          2. How it works…
      15. 8. Cooking Library Plugins
        1. Introduction
        2. Creating a library plugin
          1. Getting ready
          2. How to do it…
          3. How it works…
        3. Refining the plugin
          1. How to do it…
          2. How it works…
        4. Configuring the plugin with PhpStorm
          1. How to do it…
          2. There's more...
          3. How it works…
        5. Code hinting for the plugin
          1. Getting ready
          2. How to do it…
          3. How it works…
      16. 9. Code Quality Analysis
        1. Introduction
        2. Mess detector and PhpStorm
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
        3. Code sniffer and PhpStorm
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more...
        4. Locating code duplicates
          1. How to do it…
          2. How it works…
          3. There's more...
        5. Code formatting and arrangement
          1. How to do it…
          2. How it works…
      17. Index