Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

StringUtils: hopefully a little better encoding list

  • Loading branch information...
commit 5f42457d0af0c317f9f88021f2fa643c030f284d 1 parent b831a53
@marc-mabe authored
View
14 library/Zend/Stdlib/StringUtils.php
@@ -36,7 +36,7 @@
protected static $wrapperRegistry;
/**
- * A list of known single-byte encodings (upper-case)
+ * A list of known single-byte character encodings (upper-case)
*
* @var string[]
*/
@@ -105,12 +105,12 @@ public static function unregisterWrapper(StringWrapperInterface $wrapper)
}
/**
- * Get the first string wrapper supporting one or more encodings
+ * Get the first string wrapper supporting one or more character encodings
*
- * @param string $encoding Encoding supported by he string wrapper
- * @param string $encodingN, ... Unlimited OPTIONAL number of additional encodings
+ * @param string $encoding Character encoding supported by he string wrapper
+ * @param string $encodingN, ... Unlimited OPTIONAL number of additional character encodings
* @return StringWrapperInterface
- * @throws Exception\RuntimeException If no wrapper supports all given encodings
+ * @throws Exception\RuntimeException If no wrapper supports all given character encodings
*/
public static function getWrapper($encoding = 'UTF-8')
{
@@ -132,7 +132,7 @@ public static function getWrapper($encoding = 'UTF-8')
}
/**
- * Get a list of all known single-byte encodings
+ * Get a list of all known single-byte character encodings
*
* @return string[]
*/
@@ -142,7 +142,7 @@ public static function getSingleByteEncodings()
}
/**
- * Check if a given encoding is a known single-byte encoding
+ * Check if a given encoding is a known single-byte character encoding
*
* @param string $encoding
* @return boolean
View
18 library/Zend/Stdlib/StringWrapper/AbstractStringWrapper.php
@@ -205,22 +205,4 @@ public function strPad($input, $padLength, $padString = ' ', $padType = \STR_PAD
return $return;
}
-
- /**
- * Get the internal used name of an encoding
- *
- * @param string $encoding
- * @return string
- * @throws Exception\InvalidArgumentException On an unsupported encoding
- */
- protected function getInternalEncoding($encoding)
- {
- $encodingUpper = strtoupper($encoding);
- if (!isset($this->encodingMap[$encodingUpper])) {
- throw new Exception\InvalidArgumentException(
- "Character encoding '{$encoding}' isn't supported by this string wrapper"
- );
- }
- return $this->encodingMap[$encodingUpper];
- }
}
View
4 library/Zend/Stdlib/StringWrapper/StringWrapperInterface.php
@@ -19,7 +19,7 @@
{
/**
- * Check if the given encoding is supported
+ * Check if the given character encoding is supported
*
* @param string $encoding
* @return boolean
@@ -27,7 +27,7 @@
public function isEncodingSupported($encoding);
/**
- * Get a list of supported encodings
+ * Get a list of supported character encodings
*
* @return string[]
*/
Please sign in to comment.
Something went wrong with that request. Please try again.