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


PHP LocaleUtil::getInstance方法代码示例

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


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

示例1: parseAddData

 public function parseAddData($postArr, $admin = false)
 {
     // Extract dates
     $postArr['txtLeaveFromDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtLeaveFromDate']);
     $postArr['txtLeaveToDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtLeaveToDate']);
     // Extract time
     $postArr['sltLeaveFromTime'] = LocaleUtil::getInstance()->convertToStandardTimeFormat($postArr['sltLeaveFromTime']);
     $postArr['sltLeaveToTime'] = LocaleUtil::getInstance()->convertToStandardTimeFormat($postArr['sltLeaveToTime']);
     if ($admin) {
         $this->parent_Leave->setEmployeeId($postArr['cmbEmployeeId']);
     } else {
         $this->parent_Leave->setEmployeeId($_SESSION['empID']);
     }
     $this->parent_Leave->setLeaveTypeId($postArr['sltLeaveType']);
     $this->parent_Leave->setLeaveFromDate($postArr['txtLeaveFromDate']);
     if (isset($postArr['txtLeaveToDate']) && !empty($postArr['txtLeaveToDate'])) {
         $this->parent_Leave->setLeaveToDate($postArr['txtLeaveToDate']);
     } else {
         $this->parent_Leave->setLeaveToDate($postArr['txtLeaveFromDate']);
     }
     if ($this->parent_Leave->getLeaveFromDate() == $this->parent_Leave->getLeaveToDate() && $this->parent_Leave->getLeaveFromDate() != null) {
         $lengthHours = $postArr['txtLeaveTotalTime'];
         if (!empty($postArr['sltLeaveFromTime']) && !empty($postArr['sltLeaveToTime'])) {
             $this->parent_Leave->setStartTime($postArr['sltLeaveFromTime']);
             $this->parent_Leave->setEndTime($postArr['sltLeaveToTime']);
         }
         $this->parent_Leave->setLeaveLengthHours($lengthHours);
     } else {
         $lengthDays = 1;
         $this->parent_Leave->setLeaveLengthDays($lengthDays);
     }
     $this->parent_Leave->setLeaveComments($postArr['txtComments']);
     return $this->parent_Leave;
 }
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:34,代码来源:EXTRACTOR_LeaveRequests.php

示例2: getValue

 public function getValue($row, $ddList)
 {
     $value = "";
     switch ($this->type) {
         case self::FIELD_TYPE_DIRECT:
             if (isset($row[$this->name])) {
                 $valueFromDb = $row[$this->name];
                 $value = CSVField::escape($valueFromDb);
             }
             break;
         case self::FIELD_TYPE_DATE:
             if (isset($row[$this->name])) {
                 $valueFromDb = $row[$this->name];
                 $value = CSVField::escape(LocaleUtil::getInstance()->formatDate($valueFromDb));
             }
             break;
         case self::FIELD_TYPE_FROMMAP:
             if (isset($row[$this->name])) {
                 $valueFromDb = $row[$this->name];
                 $value = CSVField::escape(CSVField::getValueFromMap($this->map, $valueFromDb));
             }
             break;
         case self::FIELD_TYPE_DIRECT_DEBIT:
             $value = CSVField::escape($this->_getDDValue($row, $ddList));
             break;
     }
     return $value;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:28,代码来源:CSVField.php

示例3: parseViewDataWithTimezoneDiff

 public function parseViewDataWithTimezoneDiff($clientStartDate, $clientEndDate, $timesheetPeriodId)
 {
     $this->parent_Timesheet = new Timesheet();
     $this->parent_Timesheet->setStartDate(LocaleUtil::getInstance()->convertToStandardDateFormat($clientStartDate));
     $this->parent_Timesheet->setEndDate(LocaleUtil::getInstance()->convertToStandardDateFormat($clientEndDate) . " 23:59:59");
     $this->parent_Timesheet->setTimesheetPeriodId($timesheetPeriodId);
     $this->parent_Timesheet->setEmployeeId($_SESSION['empID']);
     return $this->parent_Timesheet;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:9,代码来源:EXTRACTOR_Timesheet.php

示例4: reloadData

 public function reloadData($postArr)
 {
     $postArr['ChiDOB'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['ChiDOB']);
     $this->txtEmpID = $postArr['txtEmpID'];
     $this->txtDSeqNo = trim($postArr['txtDSeqNo']);
     $this->txtChiName = trim($postArr['txtChiName']);
     $this->DOB = self::_handleEmptyDates($postArr['ChiDOB']);
     return $this;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:9,代码来源:EXTRACTOR_EmpChildren.php

示例5: parseData

 public function parseData($postArr)
 {
     $postArr['txtEmpLicDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpLicDat']);
     $postArr['txtEmpreDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpreDat']);
     $this->emplicen->setEmpId(trim($postArr['txtEmpID']));
     $this->emplicen->setEmpLicCode(trim($postArr['cmbLicCode']));
     $this->emplicen->setEmpLicDat(self::_handleEmptyDates($postArr['txtEmpLicDat']));
     $this->emplicen->setEmpLicrenewalDat(self::_handleEmptyDates($postArr['txtEmpreDat']));
     return $this->emplicen;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:10,代码来源:EXTRACTOR_EmpLicenses.php

示例6: parseData

 function parseData($postArr)
 {
     $postArr['txtEmpConExtStartDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpConExtStartDat']);
     $postArr['txtEmpConExtEndDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpConExtEndDat']);
     $this->empconext->setEmpId(trim($postArr['txtEmpID']));
     $this->empconext->setEmpConExtId(trim($postArr['txtEmpConExtID']));
     $this->empconext->setEmpConExtStartDat(trim($postArr['txtEmpConExtStartDat']));
     $this->empconext->setEmpConExtEndDat(trim($postArr['txtEmpConExtEndDat']));
     return $this->empconext;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:10,代码来源:EXTRACTOR_EmpConExt.php

示例7: parseEditData

 public static function parseEditData($postArr)
 {
     $payPeriod = new HspPayPeriod();
     $payPeriod->setId($postArr['txtPayPeriodId']);
     $payPeriod->setStartDate(LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtPayPeriodFromDate']));
     $payPeriod->setEndDate(LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtPayPeriodToDate']));
     $payPeriod->setCloseDate(LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtPayPeriodCloseDate']));
     $payPeriod->setTimesheetAprovalDueDate(LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtPayPeriodTimesheetDueDate']));
     $payPeriod->setCheckDate(LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtPayPeriodCheckDate']));
     return $payPeriod;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:11,代码来源:EXTRACTOR_HspPayPeriod.php

示例8: parseData

 public function parseData($postArr)
 {
     $postArr['txtEmpEduStartDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpEduStartDate']);
     $postArr['txtEmpEduEndDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpEduEndDate']);
     $this->empeducation->setEmpId(trim($postArr['txtEmpID']));
     $this->empeducation->setEduCode(trim($postArr['cmbEduCode']));
     $this->empeducation->setEduMajor(trim($postArr['txtEmpEduMajor']));
     $this->empeducation->setEduYear(empty($postArr['txtEmpEduYear']) ? 'null' : trim($postArr['txtEmpEduYear']));
     $this->empeducation->setEduGPA(trim($postArr['txtEmpEduGPA']));
     $this->empeducation->setEduStartDate(self::_handleEmptyDates($postArr['txtEmpEduStartDate']));
     $this->empeducation->setEduEndDate(self::_handleEmptyDates($postArr['txtEmpEduEndDate']));
     return $this->empeducation;
 }
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:13,代码来源:EXTRACTOR_EmpEducation.php

示例9: parseData

 public function parseData($postArr)
 {
     $postArr['txtMemCommDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtMemCommDat']);
     $postArr['txtMemRenDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtMemRenDat']);
     $this->empmemship->setEmpId(trim($postArr['txtEmpID']));
     $this->empmemship->setEmpMemCode(trim($postArr['cmbMemCode']));
     $this->empmemship->setEmpMemTypeCode(trim($postArr['cmbMemTypeCode']));
     $this->empmemship->setEmpMemSubOwn(trim($postArr['cmbMemSubOwn']));
     $this->empmemship->setEmpMemSubAmount(trim($postArr['txtMemSubAmount']) == "" ? 0 : trim($postArr['txtMemSubAmount']));
     $this->empmemship->setEmpMemCommDat(self::_handleEmptyDates($postArr['txtMemCommDat']));
     $this->empmemship->setEmpMemRenDat(self::_handleEmptyDates($postArr['txtMemRenDat']));
     return $this->empmemship;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:13,代码来源:EXTRACTOR_EmpMembership.php

示例10: parseData

 public function parseData($postArr)
 {
     $postArr['txtEmpExpFromDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpExpFromDate']);
     $postArr['txtEmpExpToDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtEmpExpToDate']);
     $this->empwrkexp->setEmpId(trim($postArr['txtEmpID']));
     $this->empwrkexp->setEmpExpSeqNo($postArr['txtEmpExpID']);
     $this->empwrkexp->setEmpExpEmployer(trim($postArr['txtEmpExpEmployer']));
     $this->empwrkexp->setEmpExpJobTitle(trim($postArr['txtEmpExpJobTitle']));
     $this->empwrkexp->setEmpExpFromDate(self::_handleEmptyDates($postArr['txtEmpExpFromDate']));
     $this->empwrkexp->setEmpExpToDate(self::_handleEmptyDates($postArr['txtEmpExpToDate']));
     $this->empwrkexp->setEmpExpComments(trim($postArr['txtEmpExpComments']));
     $this->empwrkexp->setEmpExpInternal(isset($postArr['chkEmpExpInternal']) ? 1 : 0);
     return $this->empwrkexp;
 }
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:14,代码来源:EXTRACTOR_EmpWorkExp.php

示例11: parseAddData

 /**
  * Parse data from interface and return JobApplicationEvent Object
  * @param Array $postArr Array containing POST values
  * @return JobApplicationEvent Job Application Event object
  */
 public function parseAddData($postArr)
 {
     $event = new JobApplicationEvent();
     $id = $postArr['txtId'];
     $event->setApplicationId($id);
     $date = $postArr['txtDate'];
     $time = $postArr['txtTime'];
     $dateTime = LocaleUtil::getInstance()->convertToStandardDateTimeFormat($date . ' ' . $time);
     $event->setEventTime($dateTime);
     $interviewer = $postArr['cmbInterviewer'];
     $event->setOwner($interviewer);
     $notes = $postArr['txtNotes'];
     $event->setNotes($notes);
     return $event;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:20,代码来源:EXTRACTOR_ScheduleInterview.php

示例12: parseEditData

 /**
  * Pares edit data in the UI form
  *
  * @param mixed $postArr
  * @return Leave[]
  */
 public function parseEditData($postArr)
 {
     $postArr['txtDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtDate']);
     if (isset($_POST['txtId']) && !empty($postArr['txtId'])) {
         $this->parent_Holidays->setHolidayId($postArr['txtId']);
     }
     $this->parent_Holidays->setDescription($postArr['txtDescription']);
     $this->parent_Holidays->setDate($postArr['txtDate']);
     if (isset($postArr['chkRecurring'])) {
         $this->parent_Holidays->setRecurring($postArr['chkRecurring']);
     } else {
         $this->parent_Holidays->setRecurring(Holidays::HOLIDAYS_NOT_RECURRING);
     }
     $this->parent_Holidays->setLength($postArr['sltLeaveLength']);
     return $this->parent_Holidays;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:22,代码来源:EXTRACTOR_Holidays.php

示例13: formatValue

function formatValue($string, $key, $replacements)
{
    if ($string == ReportField::EMPTY_MARKER) {
        return $string;
    }
    if (array_key_exists($key, $replacements)) {
        $string = $replacements[$key][$string];
    }
    if ($key === 'AGE' || $key === 'SERPIR') {
        $duration = $string;
    } elseif ($key === 'CONTRACT') {
        list($start, $end) = explode(' - ', $string);
        $string = LocaleUtil::getInstance()->formatDate($start) . ' - ' . LocaleUtil::getInstance()->formatDate($end);
    }
    return $string;
}
开发者ID:googlecode-mirror,项目名称:pucit-orangehrm,代码行数:16,代码来源:report.php

示例14: parseAddData

 public function parseAddData($postArr)
 {
     // Extract dates
     $postArr['txtLeaveFromDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtLeaveFromDate']);
     $postArr['txtLeaveToDate'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtLeaveToDate']);
     $this->parent_Leave->setEmployeeId($_SESSION['empID']);
     $this->parent_Leave->setLeaveTypeId($postArr['sltLeaveType']);
     $this->parent_Leave->setLeaveFromDate($postArr['txtLeaveFromDate']);
     if (isset($postArr['txtLeaveToDate']) && !empty($postArr['txtLeaveToDate'])) {
         $this->parent_Leave->setLeaveToDate($postArr['txtLeaveToDate']);
     } else {
         $this->parent_Leave->setLeaveToDate($postArr['txtLeaveFromDate']);
     }
     $this->parent_Leave->setLeaveLength($postArr['sltLeaveLength']);
     $this->parent_Leave->setLeaveComments($postArr['txtComments']);
     return $this->parent_Leave;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:17,代码来源:EXTRACTOR_Leave.php

示例15: reloadData

 public function reloadData($postArr)
 {
     $postArr['txtI9ReviewDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtI9ReviewDat']);
     $postArr['txtPPIssDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtPPIssDat']);
     $postArr['txtPPExpDat'] = LocaleUtil::getInstance()->convertToStandardDateFormat($postArr['txtPPExpDat']);
     $this->txtEmpID = $postArr['txtEmpID'];
     $this->txtPPSeqNo = trim($postArr['txtPPSeqNo']);
     $this->txtPPNo = trim($postArr['txtPPNo']);
     $this->txtPPIssDat = self::_handleEmptyDates($postArr['txtPPIssDat']);
     $this->txtPPExpDat = self::_handleEmptyDates($postArr['txtPPExpDat']);
     $this->txtComments = trim($postArr['txtComments']);
     $this->PPComment = trim($postArr['PPComment']);
     $this->txtI9status = $postArr['txtI9status'];
     $this->PPType = $postArr['PPType'];
     $this->cmbPPCountry = $postArr['cmbPPCountry'];
     $this->txtI9ReviewDat = self::_handleEmptyDates($postArr['txtI9ReviewDat']);
     return $this;
 }
开发者ID:noikiy,项目名称:owaspbwa,代码行数:18,代码来源:EXTRACTOR_EmpPassPort.php


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