Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Matthew Daniel  >  PHP Action Deferer  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example usage of deferer
Class: PHP Action Deferer
Defer execution of actions until the script ends
Author: By
Last change:
Date: 2013-12-08 14:12
Size: 354 bytes
 

Contents

Class file image Download
<?php

/**
 * To use just include this at the very beginning of each script.
**/

deferer::initialize();

deferer::registerAction(function () {
    
// register user actions

    // log user actions

    // send email

    // track page load times

    // etc
});

// more script stuff

deferer::registerAction(function() {
    
// send the admin an email of some action
});