public function validate(SxModule_Members $object) { $this->validateTextRequired($object->getName(), 'name', 'settings', $this->_namespace); $this->validateTextRequired($object->getFirstName(), 'first_name', 'settings', $this->_namespace); $this->validateEmail($object->getEmail(), 'email', 'settings', $this->_namespace); $this->validatePassword($object->getPassword(), 'password', 'settings', $this->_namespace); $msgr = Sanmax_MessageStack::getInstance($this->_namespace); if (!$msgr->getNamespaceMessages()) { return true; } return false; }
public function toArray(SxModule_Members $item, $type = '*') { $data = array('id' => (int) $item->getId(), 'active' => (int) $item->getActive(), 'lng' => $item->getLng(), 'sex' => $item->getSex(), 'name' => $item->getName(), 'first_name' => $item->getFirstName(), 'company' => $item->getCompany(), 'website' => $item->getWebsite(), 'email' => $item->getEmail(), 'password' => $item->getPassword(), 'phone' => $item->getPhone(), 'fax' => $item->getFax(), 'mobile_phone' => $item->getMobilePhone(), 'street' => $item->getStreet(), 'number' => $item->getNumber(), 'postalcode' => $item->getPostalcode(), 'place' => $item->getPlace(), 'country' => $item->getCountry(), 'board_member' => (int) $item->getBoardMember(), 'date_created' => $item->getDateCreated(), 'date_updated' => $item->getDateUpdated()); return $data; }