profiles = $profiles; $this->config = yaml::load($input); } function has(string $pkey, string $profile): bool { if ($this->profiles && !in_array($profile, $this->profiles)) return false; return A::phas_s($this->config, $pkey); } function get(string $pkey, string $profile) { if ($this->profiles && !in_array($profile, $this->profiles)) return null; return A::pget_s($this->config, $pkey); } function set(string $pkey, $value, string $profile): void { if ($this->profiles && !in_array($profile, $this->profiles)) { throw new ValueException("$profile: unauthorized profile"); } A::pset_s($this->config, $pkey, $value); } }