class PropelPHPParser
Service class for parsing PHP code strings and editing them
Methods
__construct(string $code, boolean $isAddPhp = false)
Parser constructor |
||
string |
getCode()
Get the modified code |
|
mixed |
findMethod(string $methodName)
Parse the code looking for a method definition, and returns the code if found |
|
mixed |
removeMethod(string $methodName)
Parse the code looking for a method definition, and removes the code if found |
|
mixed |
replaceMethod(string $methodName, string $newCode)
Parse the code looking for a method definition, and replaces the code if found |
|
mixed |
addMethodAfter(string $methodName, string $newCode)
Parse the code looking for a method definition, and adds the code after if found |
|
mixed |
addMethodBefore(string $methodName, string $newCode)
Parse the code looking for a method definition, and adds the code before if found |
Details
at line 44
public
__construct(string $code, boolean $isAddPhp = false)
Parser constructor
at line 55
public string
getCode()
Get the modified code
at line 77
public mixed
findMethod(string $methodName)
Parse the code looking for a method definition, and returns the code if found
at line 154
public mixed
removeMethod(string $methodName)
Parse the code looking for a method definition, and removes the code if found
at line 173
public mixed
replaceMethod(string $methodName, string $newCode)
Parse the code looking for a method definition, and replaces the code if found
at line 192
public mixed
addMethodAfter(string $methodName, string $newCode)
Parse the code looking for a method definition, and adds the code after if found
at line 211
public mixed
addMethodBefore(string $methodName, string $newCode)
Parse the code looking for a method definition, and adds the code before if found