All pastes #115171 Raw Edit

Untitled

public php v1 · immutable
·published 2006-08-04 12:25 UTC
rendered paste body
class mesCommandes extends message (la derniere classe que t'avais){	function mafonctionperso1	{		//instruction	}	function mafonctionperso2	{		//instruction	}}class main{	var $events ;	//toutes les fonctions que t'avais		function registerEvents($type, $regex, $fonction)	{		$this->events[] = array('type' => $type, 'regex' => $regex, 'fonction' => $fonction);	}	function defineType($data)	{		//mettre ici ce que tu veux pour definir les types ..	}	function checkEvents($data)	{		for($i=0;$i<count($this->events);$i++)		{			if(defineType($data) == $this->events[$i]['type'] && preg_match($this->events[$i]['regex'],$data))			{				eval(${'this->'.$this->events[$i]['fonction']};);				break;				}		}	}	}