/** * Translates a fieldname to another type * * @param string $name field name * @param string $fromType One of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM * @param string $toType One of the class type constants * @return string translated name of the field. * @throws PropelException - if the specified name could not be found in the fieldname mappings. */ public static function translateFieldName($name, $fromType, $toType) { $toNames = UserPeer::getFieldNames($toType); $key = isset(UserPeer::$fieldKeys[$fromType][$name]) ? UserPeer::$fieldKeys[$fromType][$name] : null; if ($key === null) { throw new PropelException("'{$name}' could not be found in the field names of type '{$fromType}'. These are: " . print_r(UserPeer::$fieldKeys[$fromType], true)); } return $toNames[$key]; }
/** * Prepare list of users * @return array */ public static function selectUsersListOrderByConfirmation() { $sqlKeys = UserPeer::getFieldNames(BasePeer::TYPE_PHPNAME); $users = self::create()->select($sqlKeys)->addAsColumn('Number', UsermealPeer::NUMBER)->addJoin(UserPeer::ID, UsermealPeer::USER_ID, Criteria::LEFT_JOIN)->groupBy(UserPeer::ID)->orderBy(UserPeer::ANSWERED)->find()->toArray(); // On convertit les ENUMs foreach ($users as $k => $user) { $users[$k]['Answered'] = User::getAnsweredValue($users[$k]['Answered']); } return $users; }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setDomainnameId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setName($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setFathersName($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setGrandFathersName($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setLogin($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setPhone($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setNtPassword($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setLmPassword($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setCryptPassword($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setUnixPassword($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setGid($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setUid($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setStatus($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setAlternateEmail($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setEmailLocalPart($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setEmailQuota($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setExpiresAt($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setCreatedAt($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setUpdatedAt($arr[$keys[19]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setLogin($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setPasswordHash($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setFamilyName($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setSurname($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setIsActive($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setCardNumber($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setBirthdate($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setIsMember($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setEmailAddress($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setAddress($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setPhoneNumber($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setCreatedAt($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setPhotograph($arr[$keys[13]]); } }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setNickname($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setFirstName($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setLastName($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setCreatedAt($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setEmail($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setSha1Password($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setSalt($arr[$keys[7]]); } }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setUsername($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setPassword($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setEnrolment($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setEnrolflag($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setRoll($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setRollflag($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setGraduationyear($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setGraduationyearflag($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setBranchId($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setBranchflag($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setDegreeId($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setDegreeflag($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setUsertype($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setTempemail($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setCurrentlyat($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setCurrentlyatflag($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setIslocked($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setIsinvited($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setAuthcode($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setLastlogin($arr[$keys[20]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setRoleId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setEmployeeId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setUser($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setPassword($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setStatus($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setCreatedAt($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setUpdatedAt($arr[$keys[7]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setUserId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setLastname($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setFirstname($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setUsername($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setPassword($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setAuthSource($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setEmail($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setStatus($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setOfficialCode($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setPhone($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setPictureUri($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setCreatorId($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setCompetences($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setDiplomas($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setOpenarea($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setTeach($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setProductions($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setChatcallUserId($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setChatcallDate($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setChatcallText($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setLanguage($arr[$keys[20]]); } if (array_key_exists($keys[21], $arr)) { $this->setRegistrationDate($arr[$keys[21]]); } if (array_key_exists($keys[22], $arr)) { $this->setExpirationDate($arr[$keys[22]]); } if (array_key_exists($keys[23], $arr)) { $this->setActive($arr[$keys[23]]); } if (array_key_exists($keys[24], $arr)) { $this->setOpenid($arr[$keys[24]]); } if (array_key_exists($keys[25], $arr)) { $this->setTheme($arr[$keys[25]]); } if (array_key_exists($keys[26], $arr)) { $this->setHrDeptId($arr[$keys[26]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's BasePeer::TYPE_PHPNAME * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setAccountId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setDomainId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setDeleted($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setName($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setFirstname($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setLastname($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setPhone($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setManagerOf($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setIsAdmin($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setEmail($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setPasswordHash($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setNumber($arr[$keys[12]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setLogin($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setPsw($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setEmail($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setStatus($arr[$keys[4]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setName($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setSurname($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setPassword($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setJiraLogin($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setJiraPassword($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setEmail($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setKarma($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setActivity($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setManager($arr[$keys[9]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setUsername($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setEmail($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setPassword($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setPoints($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setCreatedAt($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setLastActivityAt($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setType($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setHidden($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setName($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setGender($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setHometown($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setHomePhone($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setMobilePhone($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setBirthdate($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setAddress($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setRelationshipStatus($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setShowEmail($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setShowGender($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setShowHometown($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setShowHomePhone($arr[$keys[20]]); } if (array_key_exists($keys[21], $arr)) { $this->setShowMobilePhone($arr[$keys[21]]); } if (array_key_exists($keys[22], $arr)) { $this->setShowBirthdate($arr[$keys[22]]); } if (array_key_exists($keys[23], $arr)) { $this->setShowAddress($arr[$keys[23]]); } if (array_key_exists($keys[24], $arr)) { $this->setShowRelationshipStatus($arr[$keys[24]]); } if (array_key_exists($keys[25], $arr)) { $this->setPasswordRecoverKey($arr[$keys[25]]); } if (array_key_exists($keys[26], $arr)) { $this->setCookieKey($arr[$keys[26]]); } if (array_key_exists($keys[27], $arr)) { $this->setCredit($arr[$keys[27]]); } if (array_key_exists($keys[28], $arr)) { $this->setInvisible($arr[$keys[28]]); } if (array_key_exists($keys[29], $arr)) { $this->setNotification($arr[$keys[29]]); } if (array_key_exists($keys[30], $arr)) { $this->setPhoneNumber($arr[$keys[30]]); } if (array_key_exists($keys[31], $arr)) { $this->setLogin($arr[$keys[31]]); } if (array_key_exists($keys[32], $arr)) { $this->setCreditCard($arr[$keys[32]]); } if (array_key_exists($keys[33], $arr)) { $this->setCreditCardToken($arr[$keys[33]]); } if (array_key_exists($keys[34], $arr)) { $this->setFirstCharge($arr[$keys[34]]); } if (array_key_exists($keys[35], $arr)) { $this->setWhereFindUs($arr[$keys[35]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's BasePeer::TYPE_PHPNAME * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setUsername($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setPassword($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setDigestHA1($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setFirstName($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setLastName($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setEmail($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setLanguageId($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setTimezone($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setIsAdmin($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setIsBackendLoginEnabled($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setIsAdminLoginEnabled($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setIsInactive($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setPasswordRecoverHint($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setBackendSettings($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setCreatedAt($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setUpdatedAt($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setCreatedBy($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setUpdatedBy($arr[$keys[18]]); } }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setUserGroupId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setLogin($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setPassword($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setCreatedAt($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setUpdatedAt($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setDepartmentId($arr[$keys[6]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's BasePeer::TYPE_PHPNAME * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setPasswordResetKey($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setSfGuardUserId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setContactId($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setActive($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setCreatedAt($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setUpdatedAt($arr[$keys[6]]); } }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setLabel($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setLogin($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setBackend($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setType($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setSha1Password($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setSalt($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setFirstName($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setLastName($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setEmail($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setPhone($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setCity($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setAddress($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setZip($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setState($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setAddress2($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setMobilePhone($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setWorkPhone($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setContactName($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setContactNumber($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setActivationCode($arr[$keys[20]]); } if (array_key_exists($keys[21], $arr)) { $this->setCreatedAt($arr[$keys[21]]); } if (array_key_exists($keys[22], $arr)) { $this->setUpdatedAt($arr[$keys[22]]); } if (array_key_exists($keys[23], $arr)) { $this->setPublicationStatus($arr[$keys[23]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setUserName($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setPassword($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setTypeId($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setEmail($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setRegisteredOn($arr[$keys[5]]); } }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setNickname($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setFirstName($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setLastName($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setEmail($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setSha1Password($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setSalt($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setHasPaypal($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setWantToBeModerator($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setIsModerator($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setIsAdministrator($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setDeletions($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setCreatedAt($arr[$keys[12]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setPassword($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setKills($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setDeaths($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setGamesPlayed($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setWins($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setLosses($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setCurrentGameId($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setLatitude($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setLongitude($arr[$keys[9]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's BasePeer::TYPE_PHPNAME * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setEmail($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setPwd($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setActivateToken($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setResetPasswordToken($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setRole($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setDeleted($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setLanguage($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setCreatedAt($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setName($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setWebsite($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setSmProfile($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setOAuthSignIn($arr[$keys[12]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setName($arr[$keys[1]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = UserPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setUserid($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setUsername($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setMainemail($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setDeleted($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setActive($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setPassword($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setJoindate($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setActivationcode($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setActivationrequestdate($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setActivedate($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setDeletedate($arr[$keys[10]]); } }