Created
November 7, 2011 10:46
-
-
Save datiecher/1344649 to your computer and use it in GitHub Desktop.
This class example is by no means complete. It simply functions as a data object but it lacks input sanitization, filtering, only have some kind of validation. If needed I would gladly work on a more complete example. =)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* This class example is by no means complete. It simply functions as a data object | |
* but it lacks input sanitization, filtering, only have some kind of validation. | |
* If needed I would gladly work on a more complete example | |
* | |
* @throws EternalWow\Model\Exception | |
*/ | |
namespace EternalWow\Model; | |
/** | |
* Class responsible for managing applicants to the Eternal WoW Staff | |
* | |
*/ | |
class Application | |
{ | |
/** | |
* @var string | |
*/ | |
private $acceptedTerms; | |
/** | |
* @var string | |
*/ | |
private $additionalInfo; | |
/** | |
* @var integer | |
*/ | |
private $age; | |
/** | |
* @var string | |
*/ | |
private $applicationExplanation; | |
/** | |
* @var string | |
*/ | |
private $applicationType; | |
/** | |
* @var string | |
*/ | |
private $classBody; | |
/** | |
* @var string | |
*/ | |
private $corePreference; | |
/** | |
* @var string | |
*/ | |
private $developerType; | |
/** | |
* @var string | |
*/ | |
private $fluentLanguages; | |
/** | |
* @var string | |
*/ | |
private $gender; | |
/** | |
* @var boolean | |
*/ | |
private $haveWorkingMicrofone; | |
/** | |
* @var string | |
*/ | |
private $knownWebLanguages; | |
/** | |
* @var string | |
*/ | |
private $multiplesFunctionBody; | |
/** | |
* @var string | |
*/ | |
private $name; | |
/** | |
* @var string | |
*/ | |
private $portfolioLink; | |
/** | |
* @var string | |
*/ | |
private $privatePlayingTime; | |
/** | |
* @var string | |
*/ | |
private $programmingExperience; | |
/** | |
* @var string | |
*/ | |
private $retailPlayingTime; | |
/** | |
* @var string | |
*/ | |
private $webDeveloperType; | |
/** | |
* @param string $acceptedTerms | |
*/ | |
public function setAcceptedTerms($acceptedTerms) | |
{ | |
$this->acceptedTerms = $acceptedTerms; | |
} | |
/** | |
* @return string | |
*/ | |
public function getAcceptedTerms() | |
{ | |
return $this->acceptedTerms; | |
} | |
/** | |
* @param string $additionalInfo | |
*/ | |
public function setAdditionalInfo($additionalInfo) | |
{ | |
$this->additionalInfo = $additionalInfo; | |
} | |
/** | |
* @return string | |
*/ | |
public function getAdditionalInfo() | |
{ | |
return $this->additionalInfo; | |
} | |
/** | |
* @param int $age | |
*/ | |
public function setAge($age) | |
{ | |
$this->age = $age; | |
} | |
/** | |
* @return int | |
*/ | |
public function getAge() | |
{ | |
return $this->age; | |
} | |
/** | |
* @param string $applicationExplanation | |
*/ | |
public function setApplicationExplanation($applicationExplanation) | |
{ | |
$this->applicationExplanation = $applicationExplanation; | |
} | |
/** | |
* @return string | |
*/ | |
public function getApplicationExplanation() | |
{ | |
return $this->applicationExplanation; | |
} | |
/** | |
* @param string $applicationType | |
*/ | |
public function setApplicationType($applicationType) | |
{ | |
if (!in_array($applicationType, array('GM', 'Developer', 'Beta Tester'))) { | |
throw new Exception('Invalid Application Type'); | |
} | |
$this->applicationType = $applicationType; | |
} | |
/** | |
* @return string | |
*/ | |
public function getApplicationType() | |
{ | |
return $this->applicationType; | |
} | |
/** | |
* @param string $classBody | |
*/ | |
public function setClassBody($classBody) | |
{ | |
$this->classBody = $classBody; | |
} | |
/** | |
* @return string | |
*/ | |
public function getClassBody() | |
{ | |
return $this->classBody; | |
} | |
/** | |
* @param string $corePreference | |
*/ | |
public function setCorePreference($corePreference) | |
{ | |
$options = array( | |
'No Experience', | |
'MaNGOS', | |
'Trinity', | |
'ArcEMU', | |
'Ascent' | |
); | |
if (!in_array($corePreference, $options)) { | |
throw new Exception('Invalid Core Preference'); | |
} | |
$this->corePreference = $corePreference; | |
} | |
/** | |
* @return string | |
*/ | |
public function getCorePreference() | |
{ | |
return $this->corePreference; | |
} | |
/** | |
* @param string $developerType | |
*/ | |
public function setDeveloperType($developerType) | |
{ | |
$this->developerType = $developerType; | |
} | |
/** | |
* @return string | |
*/ | |
public function getDeveloperType() | |
{ | |
return $this->developerType; | |
} | |
/** | |
* @param string $fluentLanguages | |
*/ | |
public function setFluentLanguages($fluentLanguages) | |
{ | |
$this->fluentLanguages = $fluentLanguages; | |
} | |
/** | |
* @return string | |
*/ | |
public function getFluentLanguages() | |
{ | |
return $this->fluentLanguages; | |
} | |
/** | |
* @param string $gender | |
*/ | |
public function setGender($gender) | |
{ | |
$this->gender = $gender; | |
} | |
/** | |
* @return string | |
*/ | |
public function getGender() | |
{ | |
return $this->gender; | |
} | |
/** | |
* @param boolean $haveWorkingMicrofone | |
*/ | |
public function setHaveWorkingMicrofone($haveWorkingMicrofone) | |
{ | |
$this->haveWorkingMicrofone = $haveWorkingMicrofone; | |
} | |
/** | |
* @return boolean | |
*/ | |
public function getHaveWorkingMicrofone() | |
{ | |
return $this->haveWorkingMicrofone; | |
} | |
/** | |
* @param string $knownWebLanguages | |
*/ | |
public function setKnownWebLanguages($knownWebLanguages) | |
{ | |
$this->knownWebLanguages = $knownWebLanguages; | |
} | |
/** | |
* @return string | |
*/ | |
public function getKnownWebLanguages() | |
{ | |
return $this->knownWebLanguages; | |
} | |
/** | |
* @param string $multiplesFunctionBody | |
*/ | |
public function setMultiplesFunctionBody($multiplesFunctionBody) | |
{ | |
$this->multiplesFunctionBody = $multiplesFunctionBody; | |
} | |
/** | |
* @return string | |
*/ | |
public function getMultiplesFunctionBody() | |
{ | |
return $this->multiplesFunctionBody; | |
} | |
/** | |
* @param string $name | |
*/ | |
public function setName($name) | |
{ | |
$this->name = $name; | |
} | |
/** | |
* @return string | |
*/ | |
public function getName() | |
{ | |
return $this->name; | |
} | |
/** | |
* @param string $portfolioLink | |
*/ | |
public function setPortfolioLink($portfolioLink) | |
{ | |
$this->portfolioLink = $portfolioLink; | |
} | |
/** | |
* @return string | |
*/ | |
public function getPortfolioLink() | |
{ | |
return $this->portfolioLink; | |
} | |
/** | |
* @param string $privatePlayingTime | |
*/ | |
public function setPrivatePlayingTime($privatePlayingTime) | |
{ | |
$this->privatePlayingTime = $privatePlayingTime; | |
} | |
/** | |
* @return string | |
*/ | |
public function getPrivatePlayingTime() | |
{ | |
return $this->privatePlayingTime; | |
} | |
/** | |
* @param string $programmingExperience | |
*/ | |
public function setProgrammingExperience($programmingExperience) | |
{ | |
$this->programmingExperience = $programmingExperience; | |
} | |
/** | |
* @return string | |
*/ | |
public function getProgrammingExperience() | |
{ | |
return $this->programmingExperience; | |
} | |
/** | |
* @param string $retailPlayingTime | |
*/ | |
public function setRetailPlayingTime($retailPlayingTime) | |
{ | |
$this->retailPlayingTime = $retailPlayingTime; | |
} | |
/** | |
* @return string | |
*/ | |
public function getRetailPlayingTime() | |
{ | |
return $this->retailPlayingTime; | |
} | |
/** | |
* @param string $webDeveloperType | |
*/ | |
public function setWebDeveloperType($webDeveloperType) | |
{ | |
$this->webDeveloperType = $webDeveloperType; | |
} | |
/** | |
* @return string | |
*/ | |
public function getWebDeveloperType() | |
{ | |
return $this->webDeveloperType; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment