Location: PHPKode > scripts > PHP Lenex 2 > php-lenex-2/LenexClasses/LenexAgeGroup.class.php
<?

	require_once("LenexBase.class.php");
	
	define ("LENEX_AGEGROUP_GENDER_UNKNOWN","");
	define ("LENEX_AGEGROUP_GENDER_MALE","M");
	define ("LENEX_AGEGROUP_GENDER_FEMALE","F");
	define ("LENEX_AGEGROUP_GENDER_MIXED","X");
	

	class LenexAgeGroup extends LenexBase {
		
		var $ageGroupid="";
		var $ageMax="";
		var $ageMin="";
		var $gender=LENEX_AGEGROUP_GENDER_UNKNOWN;
		var $name="";

		function LenexAgeGroup($ageGroupid,$ageMin,$ageMax,$name="",$gender=LENEX_AGEGROUP_GENDER_UNKNOWN) {
			$this->ageGroupid=$ageGroupid;
			$this->ageMin=$ageMin;
			$this->ageMax=$ageMax;
			$this->name=$name;
			$this->gender=$gender;
		}
		
		/*static*/
		function fromSAX($attrs) {
			$obj =& new LenexAgeGroup(@$attrs["AGEGROUPID"],@$attrs["AGEMIN"],@$attrs["AGEMAX"],@$attrs["NAME"],@$attrs["GENDER"]);
			return $obj;
		}
		
		/*override*/
		function setParent(&$obj) {
			if (strcasecmp(get_class($obj),"lenexevent")==0) $obj->addAgeGroup($this);
			else $obj->setAgeGroup($this);
		}
	}

?>
Return current item: PHP Lenex 2