本文整理汇总了PHP中LocaleUtil类的典型用法代码示例。如果您正苦于以下问题:PHP LocaleUtil类的具体用法?PHP LocaleUtil怎么用?PHP LocaleUtil使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了LocaleUtil类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getCreatedAtLocalized
public function getCreatedAtLocalized($sFormat = ' %e. %B %Y')
{
if (Session::language() === 'en') {
$sFormat = ' %e %B %Y';
}
return LocaleUtil::localizeDate($this->created_at, null, $sFormat);
}
开发者ID:rapila,项目名称:plugin-journal,代码行数:7,代码来源:JournalComment.php
示例2: 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
示例3: 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
示例4: send
/** send()
* Description:
* • This method is called when NewsletterMailer is instanciated
* • All newsletter, sender and recipient info are ready
*
* @return boolean has_invalid email addresses
*/
public function send()
{
// Get newsletter email main template and template body and css by template name
$oEmailTemplate = new Template('main', array(DIRNAME_TEMPLATES, 'newsletter'));
$oEmailTemplate->replaceIdentifier('newsletter_template_css', new Template("{$this->oNewsletter->getTemplateName()}.css", array(DIRNAME_TEMPLATES, 'newsletter')));
// Parse links differently in text
RichtextUtil::$USE_ABSOLUTE_LINKS = LinkUtil::isSSL();
$oEMailContent = RichtextUtil::parseStorageForFrontendOutput(stream_get_contents($this->oNewsletter->getNewsletterBody()));
RichtextUtil::$USE_ABSOLUTE_LINKS = null;
// Replace add surrounding (body.tmpl) before content if exists. Template needs to contain a newsletter_content identifier
if (ResourceFinder::findResource(array(DIRNAME_TEMPLATES, NewsletterDetailWidgetModule::NEWSLETTER_DIRNAME, "{$this->oNewsletter->getTemplateName()}.body.tmpl")) !== null) {
$oEmailTemplate->replaceIdentifier('newsletter_content', new Template("{$this->oNewsletter->getTemplateName()}.body", array(DIRNAME_TEMPLATES, NewsletterDetailWidgetModule::NEWSLETTER_DIRNAME)), null, Template::LEAVE_IDENTIFIERS);
}
$oEmailTemplate->replaceIdentifier('newsletter_content', $oEMailContent, null, Template::LEAVE_IDENTIFIERS);
$oEmailTemplate->replaceIdentifier('subject', $this->oNewsletter->getSubject());
$oEmailTemplate->replaceIdentifier('language', $this->oNewsletter->getLanguageId());
$oEmailTemplate->replaceIdentifier('newsletter_link', LinkUtil::absoluteLink($this->oNewsletter->getDisplayLink()));
$oEmailTemplate->replaceIdentifier('newsletter_date', LocaleUtil::localizeDate(null, $this->oNewsletter->getLanguageId()));
$oEmailTemplate->replaceIdentifier('newsletter_timestamp', time());
// Process templates with each recipient, depending on whether recipient is object and object of Subscriber or string
foreach ($this->aRecipients as $mRecipient) {
$this->sendNewsletter($mRecipient, clone $oEmailTemplate);
}
return count($this->aInvalidEmails) === 0;
}
开发者ID:rapila,项目名称:plugin-newsletter,代码行数:32,代码来源:NewsletterMailer.php
示例5: getLastSentLocalized
public function getLastSentLocalized($sFormat = 'x')
{
if ($this->getLastSent() != null) {
return LocaleUtil::localizeDate($this->getLastSent(), null, $sFormat);
}
return null;
}
开发者ID:rapila,项目名称:plugin-newsletter,代码行数:7,代码来源:Newsletter.php
示例6: getPublishAtFormatted
public function getPublishAtFormatted($sLanguageId = null, $sFormatString = 'x')
{
if ($this->publish_at === null) {
return null;
}
return LocaleUtil::localizeDate($this->publish_at, $sLanguageId, $sFormatString);
}
开发者ID:rapila,项目名称:plugin-journal,代码行数:7,代码来源:JournalEntry.php
示例7: getDateSentFormatted
public function getDateSentFormatted($sAddTimeFormat = null)
{
$sTime = LocaleUtil::localizeDate($this->date_sent);
if ($sAddTimeFormat) {
$sTime .= ' ' . $this->getDateSent($sAddTimeFormat);
}
return $sTime;
}
开发者ID:rapila,项目名称:plugin-newsletter,代码行数:8,代码来源:NewsletterMailing.php
示例8: 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
示例9: 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
示例10: 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
示例11: 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
示例12: 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
示例13: 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
示例14: 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
示例15: 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
示例16: 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
示例17: 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
示例18: 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
示例19: 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
示例20: 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类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论