Cooper
Table of Contents
Namespaces
- Value
Classes
- Cache
- Backs `Cooper::loadFile()`'s default caching -- the Elixir original's
`Cooper.Cache`. It caches the *pre-resolve* tree (parse, imports,
loops, merge) per entry file and root, and reuses it as long as every
file that contributed -- the entry file and every file it
transitively imports -- still has the modification time it had when
cached, and every import pattern (`import "parts/*.casc"`, braces
too) still matches the files it matched then -- a file added where an
import looks, or removed from there, is a change like an edited one.
- CacheEvent
- What a `Cache::listen()` listener receives -- the PHP counterpart of
the Elixir original's `[:cooper, :cache, :file_changed]` and
`[:cooper, :cache, :env_changed]` telemetry events.
- ConformanceAdapter
- This implementation's adapter for the Cooper Conformance Suite: a
JSON request in, a JSON answer out (`php bin/cooper-conformance
REQUEST ANSWER`). The PHP twin of the Elixir reference's
`Cooper.Conformance`, with the same behaviour and the same JSON.
- Cooper
- Loads CASC config files (see `casc/CASC.md`) into native PHP values.
- CooperError
- The one exception type every `cooper` failure mode throws -- lexing,
parsing, literal validation, loop expansion, imports, merging,
reference resolution, and `.env` loading alike -- so a caller only
ever needs to catch one type.
- Dotenv
- Builds the environment `${...}` references (CASC.md §7.2) read --
the Elixir original's `Cooper.Dotenv`. `Cooper` calls it on every
load, cached or not, so `${...}` values are always current.
- EnvReference
- One `${NAME}` written as a value, as the `envValue` load option sees
it (see `Cooper`): the name it reads and everything written around it.
- ImportGlob
- One filesystem import's expansion: the `$pattern` it named (braces and
wildcards, CASC.md §5.1, after `${NAME}` interpolation), the `$root`
it was expanded under, and the `$files` it matched then.
- LiteralTag
- A consumer tag that takes **only a string literal written in the
document**, registered under the `tags` option like any other:
- LoadTrace
- What `Cooper::loadFileTraced()` returns: the loaded config, together
with everything that load depended on.
- Values
- Structural equality over loaded values -- what `-key = [...]`
(CASC.md §8.4) removes by, and what the value classes' own `equals()`
methods build on.