Пример #1
0
 public function getDisplayName()
 {
     $displayName = parent::getDisplayName();
     if (!$displayName) {
         $displayName = $this->getName();
     }
     return $displayName;
 }
Пример #2
0
 public function __construct(AbstractContact $contact)
 {
     $this->id = $contact->getId();
     $this->type = $contact instanceof Person ? 'person' : 'company';
     $this->creationDate = $contact->getCreationDate();
     $this->lastUpdated = $contact->getLastUpdated();
     $this->displayName = $contact->getDisplayName();
 }