PHP Classes

File: testconditionalEvent.php

Recommend this page to a friend!
  Classes of zinsou A.A.E.Mo´se  >  PHP Conditional Event  >  testconditionalEvent.php  >  Download  
File: testconditionalEvent.php
Role: Example script
Content type: text/plain
Description: example script
Class: PHP Conditional Event
Call a handler if an event action returns true
Author: By
Last change:
Date: 4 years ago
Size: 1,404 bytes
 

Contents

Class file image Download
<?php
require_once('./conditionalEvent.class.php');
function
test(){
    echo
'you are the happy winner of the day call +00220022155418 to claim your gift ';
    return
true;
}

function
sumit($x,$y,$z){
    return
$x+$y+$z;
}

/* ici on envoie la liste des param?tres de la fonction ?
appliquer dans l'ordre o? ils sont d?clar?s et m?me lorsque la fonction n'a qu'un seul param?tre
on doit dans tous les cas utiliser un array sauf ?videmment si la function n'exige aucun
param?tre pour fonctionner comme dans l'exemple num?ro 1...
here we send the list of function's parameters in an array
in the same order they have been declared in the function's declaration...Even if it's a single parameter
we must anyway use the array to send this parameter except if the function doesn't need any parameter
to work just like in the first example...
*/


echo'<pre>';
$exemple=new conditionalEvent('test','sumit',5);
var_dump ($exemple);
var_dump($exemple->eventapply(array(1,2,3)));


function
test2($x,$y,$z){
    echo
'you are the happy winner ';
    return
$x+$y+$z;
}

function
sumit2($x,$y,$z){
    return
$x+$y+$z;
}

$exemple2=new conditionalEvent('test2','sumit2',6,array(1,2,3));
var_dump ($exemple2);
var_dump($exemple2->eventapply(array(1,2,3)));

?><br>must use one filelog by event.Its for this reason that it would be clever to use database instead of simple
 file system

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