当前位置: 首页>>代码示例>>PHP>>正文


PHP UserPeer::getFieldNames方法代码示例

本文整理汇总了PHP中UserPeer::getFieldNames方法的典型用法代码示例。如果您正苦于以下问题:PHP UserPeer::getFieldNames方法的具体用法?PHP UserPeer::getFieldNames怎么用?PHP UserPeer::getFieldNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserPeer的用法示例。


在下文中一共展示了UserPeer::getFieldNames方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: translateFieldName

 /**
  * 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];
 }
开发者ID:eddypre,项目名称:Quirofano,代码行数:19,代码来源:BaseUserPeer.php

示例2: selectUsersListOrderByConfirmation

 /**
  * 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;
 }
开发者ID:nbehier,项目名称:BirthdayPropilex,代码行数:14,代码来源:UserQuery.php

示例3: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:habtom,项目名称:uas,代码行数:81,代码来源:BaseUser.php

示例4: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:jfesquet,项目名称:tempos,代码行数:63,代码来源:BaseUser.php

示例5: fromArray

 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]]);
     }
 }
开发者ID:arrisray,项目名称:askeet,代码行数:28,代码来源:BaseUser.php

示例6: fromArray

 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]]);
     }
 }
开发者ID:Ayaan123,项目名称:alumnisangam,代码行数:67,代码来源:BaseUser.php

示例7: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:lejacome,项目名称:hospital-mgt,代码行数:45,代码来源:BaseUser.php

示例8: fromArray

 /**
  * 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]]);
//.........这里部分代码省略.........
开发者ID:raulito1500,项目名称:mdokeos,代码行数:101,代码来源:BaseUser.php

示例9: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:dapepe,项目名称:tymio,代码行数:60,代码来源:BaseUser.php

示例10: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:alexspark21,项目名称:symfony_bisM,代码行数:36,代码来源:BaseUser.php

示例11: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:snoopckuu,项目名称:prmanagment,代码行数:51,代码来源:BaseUser.php

示例12: fromArray

 /**
  * 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]]);
//.........这里部分代码省略.........
开发者ID:rayku,项目名称:rayku,代码行数:101,代码来源:BaseUser.php

示例13: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:rapila,项目名称:cms-base,代码行数:78,代码来源:BaseUser.php

示例14: fromArray

 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]]);
     }
 }
开发者ID:taryono,项目名称:school,代码行数:25,代码来源:BaseUser.php

示例15: fromArray

 /**
  * 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]]);
     }
 }
开发者ID:homer6,项目名称:blank_altumo,代码行数:42,代码来源:BaseUser.php


注:本文中的UserPeer::getFieldNames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。