abstract class AbstractTransformation implements TransformationInterface (View source)

Abstract transformation class, transformations should inherit from this.

Methods

bool
isTransformable(NodeData $node)

Returns true, indicating that the given node can be transformed by this transformation.

execute(NodeData $node)

Execute the transformation on the given node.

Details

bool isTransformable(NodeData $node)

Returns true, indicating that the given node can be transformed by this transformation.

Parameters

NodeData $node

Return Value

bool

NodeData execute(NodeData $node)

Execute the transformation on the given node.

This implementation returns the given node unchanged.

Parameters

NodeData $node

Return Value

NodeData