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

	require_once("LenexPerson.class.php");
	require_once("LenexEntry.class.php");
	require_once("LenexHandicap.class.php");
	require_once("LenexResult.class.php");

	class LenexAthlete extends LenexPerson {
		
		var $birthDate="";
		var $entries=array();
		var $handicap=NULL;
		var $license="";
		var $results=array();

		function LenexAthlete($athleteid,$gender,$firstName,$lastName,$middleName="",$namePrefix="",$birthDate="",$license="") {
			parent::LenexPerson($athleteid,$gender,$firstName,$lastName,$middleName,$namePrefix);
			$this->birthDate=$birthDate;
			$this->license=$license;
		}
		
		/*static*/
		function fromSAX($attrs) {
			$obj =& new LenexAthlete(@$attrs["ATHLETEID"],@$attrs["GENDER"],@$attrs["FIRSTNAME"],@$attrs["LASTNAME"],@$attrs["MIDDLENAME"],@$attrs["NAMEPREFIX"],@$attrs["BIRTHDATE"],@$attrs["LICENSE"]);
			return $obj;
		}
		
		/*override*/
		function setParent(&$obj) {
			if (strcasecmp(get_class($obj),"lenexclub")==0) $obj->addAthlete($this);
			else $obj->setAthlete($this);
		}
		
		/*override*/
		function setClub(&$club) {
			$club->addAthlete($this);
		}
		
		function addEntry(&$entry) {
			$this->entries[] =& $entry;
		}
		
		function setHandicap(&$handicap) {
			$this->handicap =& $handicap;
		}

		function addResult(&$result) {
			$this->results[] =& $result;
		}
	}

?>
Return current item: PHP Lenex 2