本文整理汇总了PHP中Gender::Render方法的典型用法代码示例。如果您正苦于以下问题:PHP Gender::Render方法的具体用法?PHP Gender::Render怎么用?PHP Gender::Render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gender
的用法示例。
在下文中一共展示了Gender::Render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: strtotime
// Get parts of the birth date (so we can hide the year, if necessary)
$bdate = strtotime($m->Birthday);
$month = date("F", $bdate);
$day = date("j", $bdate);
$mm = date("m", $bdate);
$dd = date("d", $bdate);
$yyyy = date("Y", $bdate);
// Prepare the member's last activity info in case we need to provide it
$regDate = strtotime($m->RegistrationDate());
$lastUpdated = strtotime($m->LastUpdated());
$lastActivity = strtotime($m->LastActivity());
// Add fields in the same order as the first line. Very important!
$csv->AddValue($m->FirstName);
$csv->AddValue($m->MiddleName);
$csv->AddValue($m->LastName);
$csv->AddValue(Gender::Render($m->Gender));
$csv->AddValue($m->ResidenceString());
$csv->AddValue(!$m->HidePhone || $allPhones ? formatPhoneForDisplay($m->PhoneNumber) : "");
if ($allEmails) {
$csv->AddValue($m->Email);
}
if ($allBdays) {
$csv->AddValue("{$mm}-{$dd}-{$yyyy}");
} else {
$csv->AddValue(!$m->HideBirthday ? "{$month} {$day}" : '');
}
// doesn't work as well in contact importers. oh well.
if ($showActivityInfo) {
$csv->AddValue($regDate > 0 ? date("Y-m-d", $regDate) : "");
$csv->AddValue($lastUpdated > 0 ? date("Y-m-d", $lastUpdated) : "");
$csv->AddValue($lastActivity > 0 ? date("Y-m-d", $lastActivity) : "");