Implementation of a modified pre-order traversal tree for ZF2