@param string          $key
@param string|string[] $element
@param string[]        ...$elements

@return Promise
@yield bool
553352
public function pfAdd($key, $element, ...$elements) {
        return $this->send(array_merge(['pfadd', $key], (array) $element, $elements), function ($response) {
            return (bool) $response;
        });
    }
1133064
private function computeElementsToJson(array $elements)
    {
        $result = [];
        foreach ($elements as $key => $element) {
            $result[$key] = null;
            if ($element instanceof AbstractContent) {
                $result[$key] = [
                    'uid'  => $element->getUid(),
                    'type' => $element->getContentType(),
                ];
            } elseif (is_scalar($element)) {
                $result[$key] = $element;
            } elseif (is_array($element)) {
                $result[$key] = $this->computeElementsToJson($element);
            }
        }

        return $result;
    }
865734
public function removeElement($element)
    {
        $key = array_search($element, $this->getArrayCopy());
        
        if (false !== $key)
        {
            $this->remove($key);
        }
    }
1079470
public function containsKey($key)
    {
        if ($key instanceof UniqueId) {
            $key = $key->id();
        }

        return $this->elements->containsKey($key);
    }
639259
public final Promise get(String key) {
		byte[] binaryKey = key.getBytes(StandardCharsets.UTF_8);
		if (client != null) {
			return new Promise(client.get(binaryKey));
		}
		if (clusteredClient != null) {
			return new Promise(clusteredClient.get(binaryKey));
		}
		return Promise.resolve();
	}
152559
public function toJson($key = null, $options = 0)
    {
        if (is_string($key)) {
            return json_encode($this->get($key), $options);
        }
        $options = $key === null ? 0 : $key;
        return json_encode($this->elements, $options);
    }
931818
protected function wait(string $key): \Generator
    {
        if (isset($this->locks[$key])) {
            do {
                yield $this->locks[$key];
            } while (isset($this->locks[$key]));

            return true;
        }

        return false;
    }
907462
private HeaderElement getElement(HeaderKeys key) {
        HeaderElement elem = this.headerElements;
        if (null != elem) {
            // disconnect it from the rest of the free list
            this.headerElements = elem.nextInstance;
            elem.nextInstance = null;
            elem.init(key);
        } else {
            elem = new HeaderElement(key, this);
        }
        return elem;
    }
839478
public function writeElement($key, $value)
    {
        if (is_array($value)) {
            $this->iterateArray($key, $value);
        } else {
            $value = \Genesis\Utils\Common::booleanToString($value);

            $this->context->writeElement($key, $value);
        }
    }
1017079
public function set($key, $element) {
		$key = $this->extractKey($key);
		$this->collection[$key] = $element;
		
		return $this;
	}
1054941
private function prepareNode(&$node, $key)
    {
        if (!isset($node[$key])) {
            $node[$key] = null;
        } elseif (!is_array($node[$key])) {
            $node[$key] = [$node[$key]];
        }
    }
1154119
function checkKey (element) {
      if (element.name === 'template' || element.name === 'slot') {
        for (const child of element.children) {
          if (child.type === 'VElement') {
            checkKey(child)
          }
        }
      } else if (!utils.isCustomComponent(element) && !utils.hasDirective(element, 'bind', 'key')) {
        context.report({
          node: element.startTag,
          loc: element.startTag.loc,
          message: "Elements in iteration expect to have 'v-bind:key' directives."
        })
      }
    }
882136
public static function GetElementsByKeys (array $array, array $keys) {
		return array_filter(array_combine($keys, array_map(function ($key) use ($array) {
			return isset($array[$key]) ? $array[$key] : null;
		}, $keys)));
	}
698670
function(webElems) {
      var texts = webElems.then(function(arr) {
        var results = arr.map(function(webElem) {
          return webElem.getText();
        });
        return webdriver.promise.all(results);
      });

      expect(texts).not.toContain('e');

      return true;
    }
72227
public function get($key)
    {
        if ($key instanceof UniqueId) {
            $key = $key->id();
        }

        return $this->elements->get($key);
    }
690716
public function nullSafePut($key, $elem)
    {
        if($elem !== null && !empty($elem)) {
            $this->_map[$key] = $elem;
        }

    }
786630
protected function validateElementWithKeys(
        SignedElement $element,
        \SAML2\Utilities\ArrayCollection $pemCandidates
    ) : bool {
        $lastException = null;
        foreach ($pemCandidates as $index => $candidateKey) {
            $key = new XMLSecurityKey(XMLSecurityKey::RSA_SHA256, ['type' => 'public']);
            $key->loadKey($candidateKey->getCertificate());

            try {
                /*
                 * Make sure that we have a valid signature on either the response or the assertion.
                 */
                $result = $element->validate($key);
                if ($result) {
                    $this->logger->debug(sprintf('Validation with key "#%d" succeeded', $index));
                    return true;
                }
                $this->logger->debug(sprintf('Validation with key "#%d" failed without exception.', $index));
            } catch (\Exception $e) {
                $this->logger->debug(sprintf(
                    'Validation with key "#%d" failed with exception: %s',
                    $index,
                    $e->getMessage()
                ));

                $lastException = $e;
            }
        }

        if ($lastException !== null) {
            throw $lastException;
        } else {
            return false;
        }
    }