Lines Matching +full:- +full:- +full:configuration

6 use Nyholm\Dsn\Configuration\Url;
12 * Elastica client configuration.
26 protected $configuration = [ variable in Elastica\\ClientConfiguration
35 …rt, compression, persistent, timeout, username, password, auth_type, config -> (curl, headers, url)
45 * Create configuration.
55 $clientConfiguration->set($key, $value);
62 * Create configuration from Dsn string. Example of valid DSN strings:
63 * - http://localhost
64 * - http://foo:bar@localhost:1234?timeout=4&persistant=false
65 * - pool(http://127.0.0.1 http://127.0.0.2/bar?timeout=4).
77 if ('dsn' === $func->getName()) {
79 $dsn = $func->first();
81 } elseif ('pool' === $func->getName()) {
85 foreach ($func->getArguments() as $arg) {
88 $clientConfiguration->set('connections', $connections);
90 throw new FunctionNotSupportedException($dsnString, $func->getName());
93 foreach ($func->getParameters() as $optionName => $optionValue) {
102 $clientConfiguration->set($optionName, $optionValue);
111 * @throws InvalidException if the given key is not found in the configuration
118 return $this->configuration;
121 if (!$this->has($key)) {
125 return $this->configuration[$key];
129 * Returns boolean indicates if configuration has key.
133 return \array_key_exists($key, $this->configuration);
137 * Return all configuration.
141 return $this->configuration;
150 $this->configuration[$key] = $value;
161 if (!\array_key_exists($key, $this->configuration)) {
162 $this->configuration[$key] = [$value];
164 if (\is_array($this->configuration[$key])) {
165 $this->configuration[$key][] = $value;
167 $this->configuration[$key] = [$this->configuration[$key], $value];
174 $data = ['host' => $dsn->getHost()];
176 if (null !== $dsn->getScheme()) {
177 $data['transport'] = $dsn->getScheme();
180 if (null !== $dsn->getUser()) {
181 $data['username'] = $dsn->getUser();
184 if (null !== $dsn->getPassword()) {
185 $data['password'] = $dsn->getPassword();
188 if (null !== $dsn->getUser() && null !== $dsn->getPassword()) {
192 if (null !== $dsn->getPort()) {
193 $data['port'] = $dsn->getPort();
196 if (null !== $dsn->getPath()) {
197 $data['path'] = $dsn->getPath();
200 foreach ($dsn->getParameters() as $optionName => $optionValue) {