本文整理匯總了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) : "");