* @package generis */ class common_configuration_Report { // --- ASSOCIATIONS --- // generateAssociationEnd : // --- ATTRIBUTES --- /** * Short description of attribute status * * @access private * @var int */ private $status = 0; /** * Short description of attribute VALID * * @access public * @var int */ const VALID = 0; /** * Short description of attribute INVALID * * @access public * @var int */ const INVALID = 1; /** * Short description of attribute UNKNOWN * * @access public * @var int */ const UNKNOWN = 2; /** * Short description of attribute message * * @access private * @var string */ private $message = ''; /** * Short description of attribute component * * @access private * @var common_configuration_Component */ private $component; // --- OPERATIONS --- /** * Short description of method __construct * * @access public * @author Jerome Bogaerts, * @param int $status * @param string $message * @param common_configuration_Component $component * @return mixed */ public function __construct($status, $message, common_configuration_Component $component = null) { $this->setStatus($status); $this->setMessage($message); if (!empty($component)) { $this->setComponent($component); } } /** * Short description of method getStatus * * @access public * @author Jerome Bogaerts, * @return int */ public function getStatus() { return (int) $this->status; } /** * Short description of method setStatus * * @access public * @author Jerome Bogaerts, * @param int $status * @return void */ public function setStatus($status) { $this->status = $status; } /** * Short description of method getStatusAsString * * @access public * @author Jerome Bogaerts, * @return string */ public function getStatusAsString() { $returnValue = (string) ''; switch ($this->getStatus()) { case self::INVALID: $returnValue = 'invalid'; break; case self::UNKNOWN: $returnValue = 'unknown'; break; case self::VALID: $returnValue = 'valid'; break; } return (string) $returnValue; } /** * Short description of method getMessage * * @access public * @author Jerome Bogaerts, * @return string */ public function getMessage() { return (string) $this->message; } /** * Short description of method setMessage * * @access public * @author Jerome Bogaerts, * @param string $message * @return void */ public function setMessage($message) { $this->message = $message; } /** * Short description of method getComponent * * @access public * @author Jerome Bogaerts, * @return common_configuration_Component */ public function getComponent() { return $this->component; } /** * Short description of method setComponent * * @access protected * @author Jerome Bogaerts, * @param $component common_configuration_Component * @return void */ public function setComponent(common_configuration_Component $component) { $this->component = $component; } }