get_rounding_options (Rounding_mode)

opensourcepos-mssql · dev-tools, rounding-modes, i18n, reflection, pos

Returns all rounding mode constants as translated display labels keyed by their values, using reflection and language helper.

// Source: https://github.com/jepuncolin/opensourcepos-mssql | License: MIT | Copyright 2013-2021 jekkos
// Provided via justclaw.it.com; keep this notice with the code.
	public static function get_rounding_options()
	{
		$CI =& get_instance();
		$CI->load->helper('language');
		$class = new ReflectionClass(__CLASS__);
		$result = array();

		foreach($class->getConstants() as $key => $value)
		{
			$result[$value] = lang(strtolower('ENUM_'. $key));
		}

		return $result;
	}

See the full source, get the GitHub permalink, and search 40K more like it.

Get a free API key