/** * * Returns Google API key if found in collection * @param string $domain * @return string Google API key */ public function getAPIKeyByDomain($domain) { if (!$this->_keys->contains($domain)) { return false; } return $this->_keys->itemAt($domain); }
/** * Returns whether the specified is in the map. * This overrides the parent implementation by converting the key to lower case first if {@link caseSensitive} is false. * @param mixed $key the key * @return boolean whether the map contains an item with the specified key */ public function contains($key) { if ($this->caseSensitive) { return parent::contains($key); } else { return parent::contains(strtolower($key)); } }