Skip to content
This repository has been archived by the owner on Feb 9, 2021. It is now read-only.

Allow escape for period in config nested keys #3525

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

PEMapModder
Copy link
Collaborator

Expected result:

{
  "a": {
    "b.c": "b period c",
    "b": {
      "c": "b slash c"
    }
  }
}
$config = new Config("abc.json", Config::JSON);
var_dump($config->getNested('a.b\.c')); // string(10) "b period c"
var_dump($config->getNested("a.b.c")); // string(9) "b slash c"

Note: this mechanism isn't fully tested.

@jasonw4331
Copy link

@SOF3 I think this can be used in pmmp's version

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants