The extract method feature can create a method to replace all occurrences of a given code fragment.
| 
                     
  | 
                
                     
  | 
            
| 
                     
                          | 
                
                     To create a new method from an expression: 
 
                         Extract Method dialog 
 
  | 
            
| 
                     The method will be extracted and the relevant changes made to the code.  | 
            |
| 
                     
  | 
                
                     
  | 
            
| 
                     
                          | 
                
                     Related Links: Organizing Includes  | 
            
| 
                     
  | 
                
                     
  | 
            
©1999-2013 Zend Technologies LTD. All rights reserved.