Documentation

Cache
in package

Map cache.

Tags
author

zozlak

Table of Contents

Properties

$dir  : string
$keepAlive  : int
$log  : LoggerInterface
$pdo  : PDO

Methods

__construct()  : mixed
getMap()  : Map
Creates a map object.
putMap()  : void
Saves locally cached map metadata into the database.

Properties

$keepAlive

private int $keepAlive

$log

private LoggerInterface $log

Methods

__construct()

public __construct(string $dbConfig, string $cacheDir, int $keepAlive, LoggerInterface $log) : mixed
Parameters
$dbConfig : string
$cacheDir : string
$keepAlive : int
$log : LoggerInterface

getMap()

Creates a map object.

public getMap(string $url) : Map

If the map is not yet locally cached, caches it first.

If the locally cached map is outdated, fetches an up to date version.

Parameters
$url : string
Return values
Map

putMap()

Saves locally cached map metadata into the database.

public putMap(Map $map) : void
Parameters
$map : Map

        
On this page

Search results