Public
Snippet $380 authored by Denis Chenu

checkBeforeCloseHtml plugin

checkBeforeCloseHtml.php
<?php
/**
 * checkBeforeCloseHtml : bug report
 *
 * @author Denis Chenu <denis@sondages.pro>
 * @copyright 2017 Denis Chenu <http://www.sondages.pro>
 * @license WTFPL
 * @version 0.0.1
 *
 * DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
 * TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
 * 0. You just DO WHAT THE FUCK YOU WANT TO.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */
class checkBeforeCloseHtml extends PluginBase {

  static protected $description = 'Did it work ?';
  static protected $name = 'checkBeforeCloseHtml';


  public function init()
  {
    $this->subscribe('beforeCloseHtml');
  }

  /**
   * Set the alias to get the file
   */
  public function beforeCloseHtml()
  {
    $now=microtime();
    $this->event->set("html","<p class='alert alert-warning'>Did you see it, time : {$now}</p>");
    tracevar("did you see it time : {$now}");
  }
}