class RenameNode extends AbstractTransformation (View source)

Rename a given node.

Properties

protected string $newName

New name of node

Methods

bool
isTransformable(NodeData $node)

Returns true if the given node does not yet have the new name.

execute(NodeData $node)

Renames the node to the new name.

void
setNewName(string $newName)

Sets the new name for the node to change.

Details

bool isTransformable(NodeData $node)

Returns true if the given node does not yet have the new name.

Parameters

NodeData $node

Return Value

bool

NodeData execute(NodeData $node)

Renames the node to the new name.

Parameters

NodeData $node

Return Value

NodeData

void setNewName(string $newName)

Sets the new name for the node to change.

Parameters

string $newName

Return Value

void