@@ 357-369 (lines=13) @@ | ||
354 | * @param string $username |
|
355 | * @return CouchbaseResourceManager |
|
356 | */ |
|
357 | public function setUsername($id, $username) |
|
358 | { |
|
359 | if (!$this->hasResource($id)) { |
|
360 | return $this->setResource($id, [ |
|
361 | 'username' => $username |
|
362 | ]); |
|
363 | } |
|
364 | ||
365 | $resource = &$this->resources[$id]; |
|
366 | $resource['username'] = $username; |
|
367 | ||
368 | return $this; |
|
369 | } |
|
370 | ||
371 | public function getUsername($id) |
|
372 | { |
|
@@ 371-379 (lines=9) @@ | ||
368 | return $this; |
|
369 | } |
|
370 | ||
371 | public function getUsername($id) |
|
372 | { |
|
373 | if (!$this->hasResource($id)) { |
|
374 | return $this->getResource($id); |
|
375 | } |
|
376 | ||
377 | $resource = &$this->resources[$id]; |
|
378 | return $resource['username']; |
|
379 | } |
|
380 | ||
381 | /** |
|
382 | * Set servers |
|
@@ 408-416 (lines=9) @@ | ||
405 | return $this; |
|
406 | } |
|
407 | ||
408 | public function getBucket($id) |
|
409 | { |
|
410 | if (!$this->hasResource($id)) { |
|
411 | return $this->getResource($id); |
|
412 | } |
|
413 | ||
414 | $resource = &$this->resources[$id]; |
|
415 | return $resource['bucket']; |
|
416 | } |
|
417 | ||
418 | /** |
|
419 | * Set servers |
|
@@ 445-453 (lines=9) @@ | ||
442 | return $this; |
|
443 | } |
|
444 | ||
445 | public function getPassword($id) |
|
446 | { |
|
447 | if (!$this->hasResource($id)) { |
|
448 | return $this->getResource($id); |
|
449 | } |
|
450 | ||
451 | $resource = &$this->resources[$id]; |
|
452 | return $resource['password']; |
|
453 | } |
|
454 | ||
455 | /** |
|
456 | * Normalize a list of servers into the following format: |