Exemple #1
0
 static function Output($key = 'default', $layout = 'default')
 {
     $View = new AppView();
     if (array_key_exists($key, self::$errors)) {
         $output = '';
         foreach (self::$errors[$key] as $index => $message) {
             $View->assign('key', $key);
             $View->assign('index', $index);
             $View->assign('message', $message);
             $output .= $View->fetch(Globe::GetTemplate($layout, 'errors', Url::$data['type'])) . "\n";
         }
         unset(self::$errors[$key]);
         return $output;
     } else {
         return false;
     }
 }