/** * Visits the node and resets it. * * Returns true if the node was reset. False if it was already * reset. * * @param ezcWorkflowVisitable $visitable * @return boolean */ public function visit(ezcWorkflowVisitable $visitable) { if ($visitable instanceof ezcWorkflowNode) { $id = $visitable->getId(); if (isset($this->visited[$id])) { return false; } $this->visited[$id] = true; $visitable->initState(); } return true; }
/** * Perform the visit. * * @param ezcWorkflowVisitable $visitable */ protected function doVisit(ezcWorkflowVisitable $visitable) { if ($visitable instanceof ezcWorkflowNode) { $visitable->initState(); } }