PHP Classes

File: example.php

Recommend this page to a friend!
  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: 11 years ago
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
});