Back to Language class

Method hasKey

public bool
hasKey
(mixed $string)
Determines is a key exists.
Parameters
  • string $string The key to check.
Returns
  • bool True, if the key exists.
Since
  • 1.7.0
Class: Language
Project: Joomla

Method hasKey - Source code

/**
 * Determines is a key exists.
 *
 * @param   string  $string  The key to check.
 *
 * @return  boolean  True, if the key exists.
 *
 * @since   1.7.0
 */
public function hasKey($string)
{
    if ($string === null) {
        return false;
    }
    return isset($this->strings[strtoupper($string)]);
}