KumbiaPHP  beta2
Framework PHP
 Todo Estructuras de Datos Namespaces Archivos Funciones Variables Páginas
flash.php
Ir a la documentación de este archivo.
1 <?php
23 class Flash {
24 
31  public static function show($name,$text)
32  {
33  if(isset($_SERVER['SERVER_SOFTWARE'])){
34  echo '<div class="' , $name , ' flash">' , $text , '</div>', PHP_EOL;
35  } else {
36  echo $name , ': ' , strip_tags($text) , PHP_EOL;
37  }
38  }
39 
45  public static function error($text)
46  {
47  return self::show('error',$text);
48  }
49 
55  public static function warning($text)
56  {
57  return self::show('warning',$text);
58  }
59 
65  public static function info($text)
66  {
67  return self::show('info',$text);
68  }
74  public static function valid($text)
75  {
76  return self::show('valid',$text);
77  }
78 
86  public static function notice($text)
87  {
88  return self::show('info',$text);
89  }
90 
98  public static function success($text)
99  {
100  return self::show('valid',$text);
101  }
102 }