This procedure describes how to rename a PHP element and ensure that all references to that element are updated.
All PHP elements can be renamed and refactored from PHP Explorer view. The following is a list of applicable PHP elements:
Classes
Interfaces
Variables
Methods
Functions
Constants
Class Members
Note:
Ensure that you save any changes to the file before applying the refactoring feature.
Elements can either be renamed from within the editor itself if the In-place refactoring feature is activated (will not display a preview of changes) or from the Rename Element dialog.
|
|
|
To rename an element within the editor:
Note: To preview the changes before applying them, click the arrow in the right-hand corner of the Refactor popup and select Preview.
|
The element will be renamed and all instances where that element is referenced will be updated to reflect the changes. |
|
|
|
To rename an element through the Refactor dialog:
Rename Global Variable
Rename Global Variable changes tree Note that if changes will be made in other files which reference the element being refactored, the changes will also be listed here under the file name.
|
The element will be renamed and all instances where that element is referenced will be updated to reflect the changes. |
|
|
|
Related Links: Organizing Includes |
|
|
©1999-2012 Zend Technologies LTD. All rights reserved.