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.observer.php
<?php

class TObserver {
	
	
	
}

class TConstraint {
	
	static function check(&$value, &$TConstraint,$autoset=false) {
		
		if(empty($TConstraint)) return true;
		else {
			
			if(isset($TConstraint['min'])) {
				if($value<$TConstraint['min'])return TConstraint::setCheck($value, $TConstraint['min'], $autoset);
			}
			if(isset($TConstraint['max'])) {
				if($value>$TConstraint['max']) return TConstraint::setCheck($value, $TConstraint['max'], $autoset);
			}
			if(isset($TConstraint['not-null'])) {
				if(is_null($value)) return false;
			}
		}
		
		return true;		
	}
	
	static function setCheck(&$value, $contraint, $set) {
		if($set) {
			$value = $contraint;
			return true;
		}
		else {
			return false;
		}
	}
	
}

Hry