Exemplo n.º 1
0
 public static function getInstance()
 {
     if (!self::$instance) {
         self::$instance = new StateDAO();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
 /**
  * Override default validation
  * @see Phreezable::Validate()
  */
 public function Validate()
 {
     // example of custom validation
     // $this->ResetValidationErrors();
     // $errors = $this->GetValidationErrors();
     // if ($error == true) $this->AddValidationError('FieldName', 'Error Information');
     // return !$this->HasValidationErrors();
     return parent::Validate();
 }
Exemplo n.º 3
0
 function getStateList()
 {
     self::openConn();
     try {
         $stateList = StateDAO::readStateList($this->con);
     } catch (PDOException $e) {
         /* guarantees db con close */
         $stateList = NULL;
     }
     self::closeConn();
     return $stateList;
 }