* @author Johannes M. Schmitt */ abstract class GraphNavigator implements GraphNavigatorInterface { /** * @var VisitorInterface */ protected $visitor; /** * @var Context */ protected $context; /*** * @var string */ protected $format; /** * @var ExclusionStrategyInterface */ protected $exclusionStrategy; public function initialize(VisitorInterface $visitor, Context $context): void { $this->visitor = $visitor; $this->context = $context; // cache value $this->format = $context->getFormat(); $this->exclusionStrategy = $context->getExclusionStrategy(); } }