public static function validate(BlogMember $blogMember)
 {
     $errors = array();
     if (!trim($blogMember->getUsername())) {
         $errors[] = new Error('username', 'Username cannot be empty.');
     }
     if (!trim($blogMember->getPassword())) {
         $errors[] = new Error('password', 'Password cannot be empty.');
     }
     if (!trim($blogMember->getEmail())) {
         $errors[] = new Error('email', 'Email cannot be empty.');
     }
     return $errors;
 }
 private function getParams(BlogMember $blogMember)
 {
     $params = array(':member_id' => $blogMember->getId(), ':username' => $blogMember->getUsername(), ':email' => $blogMember->getEmail(), ':password' => $blogMember->getPassword());
     //        if ($flightBooking->getId()) {
     //            // unset created date, this one is never updated
     //            unset($params[':created_on']);
     //        }
     return $params;
 }