Protocol
extends Node
in package
Class \Hoa\Protocol\Protocol.
Root of the hoa://
protocol.
Tags
Table of Contents
Constants
- NO_RESOLUTION = '/hoa/flatland'
- No resolution value.
Properties
- $_cache : array<string|int, mixed>
- Cache of resolver.
- $_instance : Protocol
- Singleton.
Methods
- __construct() : mixed
- Initialize the protocol.
- clearCache() : void
- Clear the cache.
- getInstance() : Protocol
- Singleton.
- resolve() : mixed
- Resolve (unfold) an `hoa://` path to its real resource.
- initialize() : void
- Initialize the protocol.
Constants
NO_RESOLUTION
No resolution value.
public
mixed
NO_RESOLUTION
= '/hoa/flatland'
Tags
Properties
$_cache
Cache of resolver.
private
static array<string|int, mixed>
$_cache
= []
$_instance
Singleton.
private
static Protocol
$_instance
= null
Methods
__construct()
Initialize the protocol.
public
__construct() : mixed
clearCache()
Clear the cache.
public
static clearCache() : void
getInstance()
Singleton.
public
static getInstance() : Protocol
To use the hoa://
protocol shared by everyone.
Return values
Protocolresolve()
Resolve (unfold) an `hoa://` path to its real resource.
public
resolve(string $path[, bool $exists = true ][, bool $unfold = false ]) : mixed
Parameters
- $path : string
-
Path to resolve.
- $exists : bool = true
-
If
true
, try to find the first that exists, else return the first solution. - $unfold : bool = false
-
Return all solutions instead of one.
initialize()
Initialize the protocol.
protected
initialize() : void