Layout
in package
FinalYes
The names a `.dxns` file's entries have, from where the file lies under its root (DXNS.md ยง6) -- one rule for every reader of a tree: the docs generator, {@see Tree} and the file resolver; the port of `Dextrin.Schema.Layout`.
- A file named like one entry holds that entry:
acme/shop/ Customer-v2.dxns,acme/shop/Order/v1.dxnsandacme.shop.Product.dxnsholdacme.shop/Customer,acme.shop/Orderandacme.shop/Product, and the version their name says. Every other entry in such a file is internal to it:acme.shop.Order/Line. - A file holding no entry named like it is a namespace file:
acme.common.dxnsholdsacme.common/Moneyand the rest. - A name with no namespace is its own file:
HealthCheck.dxnsholdingHealthCheck.
Table of Contents
Properties
- $holder : string|null
- $internal : array<string|int, mixed>
- $names : array<string|int, mixed>
- $version : int|null
Methods
- of() : self
- The layout of the file at `$relative` (to its root, `/`-separated), holding the entries `$keys`.
- __construct() : mixed
- join() : string
-
stem()
: array{0: non-empty-list
, 1: ?int} - A file's dotted stem and the version its name says: `Customer-v2` and `Order/v1` carry one, anything else none.
Properties
$holder read-only
public
string|null
$holder
$internal read-only
public
array<string|int, mixed>
$internal
$names read-only
public
array<string|int, mixed>
$names
$version read-only
public
int|null
$version
Methods
of()
The layout of the file at `$relative` (to its root, `/`-separated), holding the entries `$keys`.
public
static of(string $relative, array<int, string> $keys) : self
Parameters
- $relative : string
- $keys : array<int, string>
Return values
self__construct()
private
__construct(array<string, string> $names, string|null $holder, int|null $version, array<int, string> $internal) : mixed
Parameters
- $names : array<string, string>
-
entry key => full name
- $holder : string|null
- $version : int|null
- $internal : array<int, string>
join()
private
static join(string $namespace, string $name) : string
Parameters
- $namespace : string
- $name : string
Return values
stringstem()
A file's dotted stem and the version its name says: `Customer-v2` and `Order/v1` carry one, anything else none.
private
static stem(string $relative) : array{0: non-empty-list, 1: ?int}
Parameters
- $relative : string