vansari / envreader Goto Github PK
View Code? Open in Web Editor NEWPHP Environment Reader
License: MIT License
PHP Environment Reader
License: MIT License
EnvReader must support array Values from ENV Keys
Expected Declaration:
CUSTOM_ENV=[foo,bar,baz]
Expected Result:
[
'foo‘,
'bar‘,
'baz‘,
]
Rules:
It would be helpful to have a JsonType where the user can config a more complex Value.
Expected Theme:
CUSTOM_ENV="{\“property\“:\"foo\", \"values\“: [{\“bar\“: \"${ANOTHER_ENV}\"}]}“
Expected Result:
[
'property‘ => 'foo‘,
'values‘ => [
[
'bar‘ => 'another env‘,
],
],
]
Rules:
At the moment the README.md has only a very slimmed down content.
The content must be filled with more details like usage, Licence, Tests execution etc.
At this time the default Types are set in the constructor of the EnvParser class.
I search a way to „inject“ a Default Config where the User can append additional Types
At the Moment in Issue #5 we can parse only primitive arrays
It would be helpful if we can parse multidimensional arrays.
Test cases:
'Array with subarrays' => [
'input‘ => '[a,b,c,[123,23,2,[abc,def]], d,e,f]‘,
'expected‘ => ['a', 'b', 'c', [123, 23, 2, ['abc', 'def']], 'd', 'e', ‚f‘]
],
'Array with subarrays #2' => [
'input‘ => '[[123,23,2,[abc,def]], a,b,c,d,e,f]‘,
'expected‘ => [[123, 23, 2, ['abc', 'def']], 'a', 'b', 'c', 'd', 'e', ‚f‘]
],
'Array with subarrays #3' => [
'input‘ => '[[123,23,2], a,b,c,d,e,f,[abc,def]]‘,
'expected‘ => [[123, 23, 2], 'a', 'b', 'c', 'd', 'e', 'f', ['abc', 'def‘]]
]
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.