protected function normalizeCharForKeyEvent($char) {
    if (!is_int($char) && !is_string($char)) {
      throw new DriverException("Unsupported key type, can only be integer or string");
    }

    if (is_string($char) && strlen($char) !== 1) {
      throw new DriverException("Key can only have ONE character");
    }

    $key = $char;
    if (is_int($char)) {
      $key = chr($char);
    }
    return $key;
  }
protected function normalizeCharForKeyEvent($char) {
    if (!is_int($char) && !is_string($char)) {
      throw new DriverException("Unsupported key type, can only be integer or string");
    }

    if (is_string($char) && strlen($char) !== 1) {
      throw new DriverException("Key can only have ONE character");
    }

    $key = $char;
    if (is_int($char)) {
      $key = chr($char);
    }
    return $key;
  }
protected function normalizeCharForKeyEvent ( $ char ) { if ( ! is_int ( $ char ) && ! is_string ( $ char ) ) { throw new DriverException ( "Unsupported key type, can only be integer or string" ) ; } if ( is_string ( $ char ) && strlen ( $ char ) !== 1 ) { throw new DriverException ( "Key can only have ONE character" ) ; } $ key = $ char ; if ( is_int ( $ char ) ) { $ key = chr ( $ char ) ; } return $ key ; }
Does some normalization for the char we want to do keyboard events with.
@param $char
@throws DriverException
@return string
Does some normalization for the char we want to do keyboard events with .