* @copyright 2012-2013 Romanenko Sergey / Awilum * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ class Alert { /** * Protected constructor since this is a static class. * * @access protected */ protected function __construct() { // Nothing here } /** * Show success message * * * Alert::success('Message here...'); * * * @param string $message Message * @param integer $time Time */ public static function success($message, $time = 3000) { // Redefine vars $message = (string) $message; $time = (int) $time; echo '
'.$message.'
'; } /** * Show warning message * * * Alert::warning('Message here...'); * * * @param string $message Message * @param integer $time Time */ public static function warning($message, $time = 3000) { // Redefine vars $message = (string) $message; $time = (int) $time; echo '
'.$message.'
'; } /** * Show error message * * * Alert::error('Message here...'); * * * @param string $message Message * @param integer $time Time */ public static function error($message, $time = 3000) { // Redefine vars $message = (string) $message; $time = (int) $time; echo '
'.$message.'
'; } }