Commit ea23a160 authored by M.Nowocyn's avatar M.Nowocyn

Add function for Template system. key::get(...); will only used to get a key...

Add function for Template system. key::get(...); will only used to get a key class without a language. close #2
parent 7ceec04b
......@@ -35,6 +35,28 @@ class key extends cache_string implements iKey
return parent::get($id, $reload);
}
/**
* @param string $id
* @param bool $reload
*
* @return string
*
* This function will used to load only the String of a key.
* If there exist no key for the wanted id the function will return a empty string
*/
public static function get_string ($id = "", $reload = FALSE): string
{
if (self::exist($id)) {
$key = self::get($id);
if ($key instanceof key) {
return $key->get_lang();
}
}
else {
return "";
}
}
/**
* @param $name
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment