lithium\net\socket\Stream::encoding()

public method

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

boolean

Returns false if stream_encoding() function does not exist, boolean result of stream_encoding() otherwise.

Source

	public function encoding($charset) {
		if (!function_exists('stream_encoding')) {
			return false;
		}
		return is_resource($this->_resource) ? stream_encoding($this->_resource, $charset) : false;
	}