lithium\net\socket\Stream::encoding()
Implements
lithium\net\Socket::encoding()
Sets the character set for stream encoding if possible. The stream_encoding
function is not guaranteed to be available as it is seems as if it's experimental
or just not officially documented. If the function is not available returns false
.
Parameters
-
string
$charset
Returns
booleanReturns false
if stream_encoding()
function does not exist, boolean
result of stream_encoding()
otherwise.
Links
Source
public function encoding($charset) {
if (!function_exists('stream_encoding')) {
return false;
}
return is_resource($this->_resource) ? stream_encoding($this->_resource, $charset) : false;
}