Example #1
0
 protected function renderValues(array $data, array &$params)
 {
     $auth = true;
     foreach ($params as $namespace => $value) {
         $replace = false;
         // have Value
         if (isset($data[$namespace])) {
             $params[$namespace] = $data[$namespace];
             $replace = true;
         }
         // is Mandatory
         if (!$replace && (bool) $params[$namespace]) {
             $auth = false;
             throw new Exception(Lang::get("stanard:error:field", "module/collector/v1", array("field" => $namespace)));
             break;
         }
         // is Null
         if (!$replace && !(bool) $params[$namespace]) {
             $params[$namespace] = null;
         }
     }
     return $auth;
 }
Example #2
0
function smarty_modifier_lang($namespace, $local)
{
    return Lang::get($namespace, $local);
}