[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/inc/File/ -> Resolver.php (summary)

Resolving relative IDs to absolute ones

File Size: 105 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions

  __construct()
  resolveId()
  resolvePrefix()
  resolveRelatives()

Functions
Functions that are not part of a class:

__construct($contextID)   X-Ref

param: string $contextID the current pageID that's the context to resolve relative IDs to

resolveId($id, $rev = '', $isDateAt = false)   X-Ref
Resolves a given ID to be absolute

param: string $id The ID to resolve
param: string|int|false $rev The revision time to use when resolving
param: bool $isDateAt Is the given revision only a datetime hint not an exact revision?
return: string

resolvePrefix($id)   X-Ref
Handle IDs starting with . or ~ and prepend the proper prefix

param: string $id
return: string

resolveRelatives($id)   X-Ref
Handle . and .. within IDs

param: string $id
return: string