<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */

namespace Kufer\KuferTools\Oeffentlich\LoginAnfordern\Utils;

class NeuesLoginAnlegenTeilnehmerLdapPassauBistum extends NeuesLoginAnlegenTeilnehmer
{
  private $postalCode;
  private $postalAddress;
  private $department;
  private $telephoneNumber;
  private $streetAddress;

  
  
  public function __construct($postalCode, $postalAddress, $department, $telephoneNumber, $streetAddress)
  {
    $this->postalCode = $postalCode;
    $this->postalAddress = $postalAddress;
    $this->department = $department;
    $this->telephoneNumber = $telephoneNumber;
    $this->streetAddress = $streetAddress;
  }

  protected function getPersonObj($pGeschlecht, $pName, $pVorname, $pEmail, $pDseUnterschriebenDatum)
  {
    $result = parent::getPersonObj($pGeschlecht, $pName, $pVorname, $pEmail, $pDseUnterschriebenDatum);
    $result->setValue2Var('abteilung', $this->department);
    $result->setValue2Var('ort', $this->postalCode . ' ' . $this->postalAddress);
    $result->setValue2Var('strasse', $this->streetAddress);
    $result->setValue2Var('tel', $this->telephoneNumber);
    $result->setValue2Var('tel_anzeige', $this->telephoneNumber);

    return $result;
  }
}