PHP Classes

File: examples/primer.php

Recommend this page to a friend!
  Classes of Yuriy Tkachenko  >  Simple Flash Messages  >  examples/primer.php  >  Download  
File: examples/primer.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Simple Flash Messages
Display message with different CSS frameworks
Author: By
Last change:
Date: 1 year ago
Size: 1,402 bytes


Class file image Download

use Tamtamchik\SimpleFlash\TemplateFactory;


__DIR__ . '/../vendor/autoload.php';

flash()->error(['Invalid email!', 'Invalid username!'])
warning('Warning message.')
info('Info message.')
success('Success message!');



<!doctype html>
<html lang="en">
    <meta charset="UTF-8">
    <title>Test Premier template example.</title>
    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="">
        /* Custom CSS for Primer flash styles separation. */
        .flash {
            margin-bottom: .5em;

<a href=""><img style="position: absolute; top: 0; right: 0; border: 0;" src="" alt="Fork me on GitHub" data-canonical-src=""></a>

<div class="container-lg" style="width: 600px;">

    <?php include_once '_menu.php'; ?>

    <?= flash() ?>


For more information send a message to info at phpclasses dot org.