RenameProperty
class RenameProperty extends AbstractTransformation (View source)
Rename a given property.
Properties
protected string | $oldPropertyName | Property name to change |
|
protected string | $newPropertyName | New name of property |
Methods
bool
isTransformable(NodeData $node)
Returns true if the given node has a property with the name to work on and does not yet have a property with the name to rename that property to.
void
setFrom(string $oldPropertyName)
Sets the name of the property to change.
void
setTo(string $newPropertyName)
Sets the new name for the property to change.
Details
bool
isTransformable(NodeData $node)
Returns true if the given node has a property with the name to work on and does not yet have a property with the name to rename that property to.
void
setFrom(string $oldPropertyName)
Sets the name of the property to change.
void
setTo(string $newPropertyName)
Sets the new name for the property to change.