Esempio n. 1
0
 /**
  * @param array $uids
  * @param array $ftrTypes
  *
  * @return array
  */
 public function getFeatureTypesByUids(array $uids, array $ftrTypes)
 {
     $result = [];
     foreach ($this->findFeatureTypesByUids($uids, $ftrTypes) as $uid => $ftrTypesPerUid) {
         foreach ($ftrTypesPerUid as $ftrTypeId => $ftTypeData) {
             $ftrTypeModel = new FeatureTypeModel();
             ObjectUtil::hydrateObject($ftrTypeModel, ['uid' => (int) Functions::navl($ftTypeData, 'USR_ID'), 'ftrType' => (int) Functions::navl($ftTypeData, 'FTR_TP'), 'number' => (int) Functions::navl($ftTypeData, 'UFT_NUMBER'), 'text' => Functions::navl($ftTypeData, 'UFT_TEXT'), 'startDate' => Functions::nadvl($ftTypeData, 'UFT_START_DATE', $this->oracle), 'endDate' => Functions::nadvl($ftTypeData, 'UFT_END_DATE', $this->oracle), 'timestamp' => Functions::nadvl($ftTypeData, 'UFT_TIMESTAMP', $this->oracle)]);
             $result[$uid][$ftrTypeId] = $ftrTypeModel;
         }
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * @param $result
  * @return FtpUserModel
  */
 public function createFtpUserFromResult($result)
 {
     $result['hostUid'] = (int) Functions::navl($result, 'hostUid');
     $result['created'] = Functions::nadvl($result, 'created', $this->oracle);
     $result['modified'] = Functions::nadvl($result, 'modified', $this->oracle);
     $ftpUser = new FtpUserModel();
     ObjectUtil::hydrateObject($ftpUser, $result);
     return $ftpUser;
 }