/** * Clears some properties for the next use. */ public function clear() { if (!is_null($this->pageFlowInstance)) { if ($this->pageFlowInstance->isInFinalState()) { $this->pageFlowInstanceRepository->remove($this->pageFlowInstance); } } if (!is_null($this->garbageCollector)) { $pageFlowInstanceRepository = $this->pageFlowInstanceRepository; $this->garbageCollector->sweep(function ($pageFlowInstanceID) use($pageFlowInstanceRepository) { $pageFlowInstance = $pageFlowInstanceRepository->findByID($pageFlowInstanceID); if (!is_null($pageFlowInstance)) { $pageFlowInstance->removePageFlow(); } }); } }
/** * Checks whether or not the page flow of the specified page flow instance * is exclusive. * * @param \Piece\Flow\Continuation\PageFlowInstance $pageFlowInstance * @return boolean * @since Method available since Release 2.0.0 */ public function checkPageFlowIsExclusive(PageFlowInstance $pageFlowInstance) { return in_array($pageFlowInstance->getPageFlowID(), $this->exclusivePageFlows); }