address; } /** * Get the phone number * * @return string the phone number of the company */ public function getPhoneNumber() : string { return $this->phone_number; } /** * Get the fax number * * @return string the fax number of the company */ public function getFaxNumber() : string { return $this->fax_number; } /** * Get the e-mail address * * @return string the e-mail address of the company */ public function getEmailAddress() : string { return $this->email_address; } /** * Get the website * * @return string the website of the company */ public function getWebsite() : string { return $this->website; } /** * Get the link to the website of an article * * @param string $partnr * NULL for returning the URL with a placeholder for the part number * * or the part number for returning the direct URL to the article * * @return string the link to the article */ public function getAutoProductUrl($partnr = null) : string { if (\is_string($partnr)) { return str_replace('%PARTNUMBER%', $partnr, $this->auto_product_url); } return $this->auto_product_url; } /******************************************************************************** * * Setters * *********************************************************************************/ /** * Set the addres * @param string $new_address the new address (with "\n" as line break) * * @return self */ public function setAddress(string $new_address) : self { $this->address = $new_address; return $this; } /** * Set the phone number * * @param string $new_phone_number the new phone number * * @return self */ public function setPhoneNumber(string $new_phone_number) : self { $this->phone_number = $new_phone_number; return $this; } /** * Set the fax number * * @param string $new_fax_number the new fax number * * @return self */ public function setFaxNumber(string $new_fax_number) : self { $this->fax_number = $new_fax_number; return $this; } /** * Set the e-mail address * * @param string $new_email_address the new e-mail address * * @return self */ public function setEmailAddress(string $new_email_address) : self { $this->email_address = $new_email_address; return $this; } /** * Set the website * * @param string $new_website the new website * * @return self */ public function setWebsite(string $new_website) : self { $this->website = $new_website; return $this; } /** * Set the link to the website of an article * * @param string $new_url the new URL with the placeholder %PARTNUMBER% for the part number * * @return self */ public function setAutoProductUrl(string $new_url) : self { $this->auto_product_url = $new_url; return $this; } }