When you're building your list of server names, the current parsing of environment variables looks like this:
if (null !== getenv('BEANSTALK_SERVERS')) {
foreach (explode(',', getenv('BEANSTALK_SERVERS')) as $key => $server) {
$this->serversEnv[$key] = $server;
}
}
I don't believe there's any way to correctly get $key from this without doing another explode (like exploding on = if your variable string were ServerA=servera.com:11300,ServerB=serverb.com:11300) or doing some other such string-wrangling a la parse_str. Do you have an example of this environment-variable format to extract both keys (human-friendly server names) and values (hostnames)?
When you're building your list of server names, the current parsing of environment variables looks like this:
I don't believe there's any way to correctly get
$keyfrom this without doing another explode (like exploding on=if your variable string wereServerA=servera.com:11300,ServerB=serverb.com:11300) or doing some other such string-wrangling a la parse_str. Do you have an example of this environment-variable format to extract both keys (human-friendly server names) and values (hostnames)?