本文整理汇总了PHP中Phone::formArrayToString方法的典型用法代码示例。如果您正苦于以下问题:PHP Phone::formArrayToString方法的具体用法?PHP Phone::formArrayToString怎么用?PHP Phone::formArrayToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phone
的用法示例。
在下文中一共展示了Phone::formArrayToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getText
public function getText($value)
{
static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs');
$jobs = array();
foreach ($value as $id => $job) {
$address = Address::formArrayToString(array($job['w_address']));
$phones = Phone::formArrayToString($job['w_phone']);
$jobs[$id] = $job['name'];
$jobs[$id] .= $job['description'] ? ', ' . $job['description'] : '';
$jobs[$id] .= ' (affichage ' . $pubs[$job['pub']];
if (count($job['terms'])) {
$terms = array();
foreach ($job['terms'] as $term) {
$terms[] = $term['full_name'];
}
$jobs[$id] .= ', mots-clefs : ' . implode(', ', $terms);
}
if ($job['w_url']) {
$jobs[$id] .= ', page perso : ' . $job['w_url'];
}
if ($address) {
$jobs[$id] .= ', adresse : ' . $address;
}
if ($job['w_email']) {
$jobs[$id] .= ', email : ' . $job['w_email'];
}
if ($phones) {
$jobs[$id] .= ', téléphones : ' . $phones;
}
$jobs[$id] .= ')';
}
return implode(' ; ', $jobs);
}
示例2: toString
private function toString()
{
$address = $this->text;
if ($this->type == self::LINK_PROFILE || $this->type == self::LINK_JOB) {
static $pubs = array('public' => 'publique', 'ax' => 'annuaire papier', 'private' => 'privé', 'hidden' => 'administrateurs');
$address .= ' (affichage ' . $pubs[$this->pub];
}
if ($this->type == self::LINK_PROFILE) {
static $flags = array('current' => 'actuelle', 'temporary' => 'temporaire', 'secondary' => 'secondaire', 'mail' => 'conctactable par courier', 'deliveryIssue' => 'n\'habite pas à l\'adresse indiquée', 'cedex' => 'type cédex');
if (!$this->flags->hasFlag('temporary')) {
$address .= ', permanente';
}
if (!$this->flags->hasFlag('secondary')) {
$address .= ', principale';
}
foreach ($flags as $flag => $flagName) {
if ($this->flags->hasFlag($flag)) {
$address .= ', ' . $flagName;
}
}
if ($this->comment) {
$address .= ', commentaire : ' . $this->comment;
}
if ($phones = Phone::formArrayToString($this->phones)) {
$address .= ', ' . $phones;
}
} elseif ($this->type == self::LINK_JOB) {
$address .= ')';
}
return $address;
}
示例3: getText
public function getText($value)
{
return Phone::formArrayToString($value);
}