AppConfig.getNumber
AppConfig.getNumber($key, $default=0) -> number
Description
Like get(), but the value is parsed as a number.
Example app.jcon
:
{ tht: { ... } app: { numArticlesOnHomePage: 15 showBioInFooter: true contact: { email: hello@example.com twitter: @myusername } } }
In THT:
AppConfig.getNumber('numArticlesOnHomePage') //= 15 AppConfig.getNumber('missingKey') //= 0