Copied!
CloneableInstantiable
Methods
public __construct(string $name, string $directory, ?string $value = NULL)
 

Make a new Tree. Each tree has a name and potential value.

  • param string $directory of where to load any found files from
public lookup(array $parts, string $directory) : ?string
 

Look up a section of the tree.

  • param array $parts the sections to continue navigating for
  • param string $directory of where to load any found files from
  • return string the looked up translated string
Properties
private string $name
private array $translations = []
 

The Tree class emulates a multi-dimentional array. There is no easy way to have an arbitrary depth on a PHP multi-dimentional and be able to add to it.

  • var array<string,mixed> $translations
private ?string $value = NULL
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration