diff --git a/src/Justimmo/Model/Employee.php b/src/Justimmo/Model/Employee.php
index fcd6a0b..fa23ea8 100644
--- a/src/Justimmo/Model/Employee.php
+++ b/src/Justimmo/Model/Employee.php
@@ -94,6 +94,11 @@ class Employee
*/
protected $url = null;
+ /**
+ * @var null|string
+ */
+ protected $salutation = null;
+
/**
* @param array $attachments
*
@@ -517,4 +522,20 @@ public function setUrl($url)
{
$this->url = $url;
}
+
+ /**
+ * @return null|string
+ */
+ public function getSalutation()
+ {
+ return $this->salutation;
+ }
+
+ /**
+ * @param null|string $salutation
+ */
+ public function setSalutation($salutation)
+ {
+ $this->salutation = $salutation;
+ }
}
diff --git a/src/Justimmo/Model/Mapper/V1/EmployeeMapper.php b/src/Justimmo/Model/Mapper/V1/EmployeeMapper.php
index 34e7c05..5b167cb 100644
--- a/src/Justimmo/Model/Mapper/V1/EmployeeMapper.php
+++ b/src/Justimmo/Model/Mapper/V1/EmployeeMapper.php
@@ -63,6 +63,9 @@ protected function getMapping()
'url' => array(
'property' => 'url',
),
+ 'anrede' => array(
+ 'property' => 'salutation',
+ ),
);
}
diff --git a/src/Justimmo/Model/Wrapper/V1/EmployeeWrapper.php b/src/Justimmo/Model/Wrapper/V1/EmployeeWrapper.php
index e17b153..ae206fb 100644
--- a/src/Justimmo/Model/Wrapper/V1/EmployeeWrapper.php
+++ b/src/Justimmo/Model/Wrapper/V1/EmployeeWrapper.php
@@ -31,6 +31,7 @@ class EmployeeWrapper extends AbstractWrapper
'plz',
'ort',
'url',
+ 'anrede',
);
public function transformSingle($data)
diff --git a/tests/Fixtures/v1/employee_list.xml b/tests/Fixtures/v1/employee_list.xml
index 33f47a0..1ff82e4 100644
--- a/tests/Fixtures/v1/employee_list.xml
+++ b/tests/Fixtures/v1/employee_list.xml
@@ -39,6 +39,7 @@
1070
Wien
https://www.justimmo.at
+ Herr
81.jpeg
diff --git a/tests/Justimmo/Tests/Wrapper/V1/EmployeeWrapperTest.php b/tests/Justimmo/Tests/Wrapper/V1/EmployeeWrapperTest.php
index 5e74599..42550a6 100644
--- a/tests/Justimmo/Tests/Wrapper/V1/EmployeeWrapperTest.php
+++ b/tests/Justimmo/Tests/Wrapper/V1/EmployeeWrapperTest.php
@@ -43,6 +43,7 @@ public function testTransform()
$this->assertEquals('1070', $entry->getPostal());
$this->assertEquals('Wien', $entry->getCity());
$this->assertEquals('https://www.justimmo.at', $entry->getUrl());
+ $this->assertEquals('Herr', $entry->getSalutation());
$this->assertInstanceOf('\Justimmo\Model\Attachment', $entry->getProfilePicture());
$this->assertEquals('http://files.justimmo.at/public/pic/user_medium/ABVB1fBrug.png', $entry->getProfilePicture()->getUrl('medium'));