| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?php
- class Company {
- private $name;
- private $address;
- private $city;
- private $postal_code;
- private $country;
- private $phone;
- private $email;
- private $y_tunnus;
- public function __construct() {
- $this->name = getenv('COMPANY_NAME') ?: 'Inventory Management System';
- $this->address = getenv('COMPANY_ADDRESS') ?: '123 Business Street';
- $this->city = getenv('COMPANY_CITY') ?: 'Helsinki';
- $this->postal_code = getenv('COMPANY_POSTAL_CODE') ?: '00100';
- $this->country = getenv('COMPANY_COUNTRY') ?: 'Finland';
- $this->phone = getenv('COMPANY_PHONE') ?: '+358 123 456 789';
- $this->email = getenv('COMPANY_EMAIL') ?: 'info@company.com';
- $this->y_tunnus = getenv('COMPANY_Y_TUNNUS') ?: '1234567-8';
- }
- public function getDetails() {
- return [
- 'name' => $this->name,
- 'address' => $this->address,
- 'city' => $this->city,
- 'postal_code' => $this->postal_code,
- 'country' => $this->country,
- 'phone' => $this->phone,
- 'email' => $this->email,
- 'y_tunnus' => $this->y_tunnus,
- 'full_address' => $this->address . ', ' . $this->postal_code . ' ' . $this->city . ', ' . $this->country,
- 'contact_info' => $this->phone . ' | ' . $this->email
- ];
- }
- public function getName() { return $this->name; }
- public function getAddress() { return $this->address; }
- public function getCity() { return $this->city; }
- public function getPostalCode() { return $this->postal_code; }
- public function getCountry() { return $this->country; }
- public function getPhone() { return $this->phone; }
- public function getEmail() { return $this->email; }
- public function getYTunnus() { return $this->y_tunnus; }
- }
- ?>
|