>|null */ private $map = null; /** * The map loader strategy. * * @var Map_Loader_Interface */ private $map_loader; /** * Constructor. * * @param Map_Loader_Interface $map_loader The map loader strategy. */ public function __construct( Map_Loader_Interface $map_loader ) { $this->map_loader = $map_loader; } /** * Retrieves the elements-context map. * * @return array> The elements context-map. */ public function get_map(): array { $this->map ??= $this->map_loader->load(); return $this->map; } /** * Saves the elements-context map. * * @codeCoverageIgnore -- This is just a setter. * * @param array> $map The elements-context map to besaved. * * @return void */ public function save_map( array $map ): void { $this->map = $map; } }