Clippy
Public Attributes | List of all members
Clippy\CommandConvertWeight Class Reference
Inheritance diagram for Clippy\CommandConvertWeight:
Inheritance graph
[legend]
Collaboration diagram for Clippy\CommandConvertWeight:
Collaboration graph
[legend]

Public Attributes

const CONVERSION
 
const PRECISION
 
const IN_NAME
 
- Public Attributes inherited from Clippy\Command
const DIR_LANG = __DIR__."/../lang/"
 
const REGEX_WORD_BEGIN = "(^| )"
 
const REGEX_WORD_END = "($| |\.|!|\?)"
 
const REGEX_YOU = "(you|ya|u)"
 
const REGEX_FLOAT = "(\d+(\.\d+)?)"
 
const REGEX_SPACE_OPT = " *"
 

Additional Inherited Members

- Public Member Functions inherited from Clippy\CommandConvert
 __construct (public float $in_amount, public string $in_unit, public float $out_amount, public string $out_unit,)
 
 getResponse ()
 
- Public Member Functions inherited from Clippy\Command
 getDefaultResponse ()
 
- Static Public Member Functions inherited from Clippy\CommandConvert
static instantiateIfMatches (string $in)
 
static format (float $value, string $unit)
 
- Static Public Member Functions inherited from Clippy\Command
static registerCommand (string $command)
 
static registerCommands (array $commands)
 
static getRegisteredCommands ()
 
static getAllCommands ()
 
static getOutputLocales ()
 
static setOutputLocale (string $name)
 
static match (string $in)
 
static translate (string $key)
 
static stringify ($value)
 
- Static Public Attributes inherited from Clippy\Command
static array $config
 
static array $out_langs = []
 

Member Data Documentation

◆ CONVERSION

const Clippy\CommandConvertWeight::CONVERSION
Initial value:
= [
"g" => 0.001,
"kg" => 1,
"ounces" => 0.02835,
"pounds" => 0.454,
"stones" => 6.356,
"hundredweights" => 50.8,
"ustons" => 907.185,
"metrictons" => 1000,
"imperialtons" => 1016.05
]

◆ IN_NAME

const Clippy\CommandConvertWeight::IN_NAME
Initial value:
= [
"g" => "g",
"kg" => "kg",
"ustons" => "ustons",
"metrictons" => "metrictons",
"imperialtons" => "imperialtons",
"gram" => "g",
"grams" => "g",
"kilogram" => "kg",
"kilograms" => "kg",
"kilo" => "kg",
"kilos" => "kg",
"ounce" => "ounces",
"ounces" => "ounces",
"pound" => "pounds",
"pounds" => "pounds",
"stone" => "stones",
"stones" => "stones",
"hundredweight" => "hundredweights",
"hundredweights" => "hundredweights",
"us ton" => "ustons",
"us tons" => "ustons",
"metric ton" => "metrictons",
"metric tons" => "metrictons",
"imperial ton" => "imperialtons",
"imperial tons" => "imperialtons",
]

◆ PRECISION

const Clippy\CommandConvertWeight::PRECISION
Initial value:
= [
"g" => 2,
"kg" => 3,
"ounces" => 2,
"pounds" => 2,
"stones" => 2,
"hundredweights" => 3,
"ustons" => 3,
"metrictons" => 3,
"imperialtons" => 3
]

The documentation for this class was generated from the following file: