Permalink
Browse files

Added partner models & interfaces

  • Loading branch information...
1 parent 886da32 commit 48b41302f6478f6747aee0f8a2f5b7c66b8bc6f1 @inspiran inspiran committed Dec 30, 2012
@@ -0,0 +1,152 @@
+<?php
+/**
+ * (c) Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+namespace Vespolina\Entity\Partner;
+
+class Address implements AddressInterface
+{
+ const INVOICE = 'INVOICE';
+ const DELIVERY = 'DELIVERY';
+ const CONTACT = 'CONTACT';
+
+ protected $type;
+ protected $street;
+ protected $number;
+ protected $numbersuffix;
+ protected $zipcode;
+ protected $city;
+ protected $state;
+ protected $country;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getType()
+ {
+ return $this->type;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setType($type)
+ {
+ $this->type = $type;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getStreet()
+ {
+ return $this->street;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setStreet($street)
+ {
+ $this->street = $street;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getNumber()
+ {
+ return $this->number;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setNumber($number)
+ {
+ $this->number = $number;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getNumbersuffix()
+ {
+ return $this->numbersuffix;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setNumbersuffix($numbersuffix)
+ {
+ $this->numbersuffix = $numbersuffix;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getZipcode()
+ {
+ return $this->zipcode;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setZipcode($zipcode)
+ {
+ $this->zipcode = $zipcode;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCity()
+ {
+ return $this->city;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setCity($city)
+ {
+ $this->city = $city;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getState()
+ {
+ return $this->state;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setState($state)
+ {
+ $this->state = $state;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getCountry()
+ {
+ return $this->country;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setCountry($country)
+ {
+ $this->country = $country;
+ }
+}
@@ -0,0 +1,101 @@
+<?php
+/**
+ * (c) Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+namespace Vespolina\Entity\Partner;
+
+interface AddressInterface
+{
+ /**
+ * Get address type
+ * @return string
+ */
+ function getType();
+
+ /**
+ * Set type of address - e.g. invoice or delivery
+ * @param string $type
+ */
+ function setType($type);
+
+ /**
+ * Get street
+ */
+ function getStreet();
+
+ /**
+ * Set street
+ * @param string $street
+ */
+ function setStreet($street);
+
+ /**
+ * Get street number
+ */
+ function getNumber();
+
+ /**
+ * Set street number
+ * @param integer $number
+ */
+
+ function setNumber($number);
+
+ /**
+ * Get streetnumber suffix
+ */
+ function getNumberSuffix();
+
+ /**
+ * Set streetnumber suffix
+ * @param string $numberSuffix
+ */
+ function setNumberSuffix($numberSuffix);
+
+ /**
+ * Get zipcode
+ */
+ function getZipcode();
+
+ /**
+ * Set zipcode
+ * @param string $zipCode
+ */
+ function setZipcode($zipCode);
+
+ /**
+ * Get city
+ */
+ function getCity();
+
+ /**
+ * Set city
+ * @param string $city
+ */
+ function setCity($city);
+
+ /**
+ * Get state / province
+ */
+ function getState();
+
+ /**
+ * Set state / province
+ * @param string $state
+ */
+ function setState($state);
+
+ /**
+ * Get country
+ */
+ function getCountry();
+
+ /**
+ * Set country
+ * @param string $country
+ */
+ function setCountry($country);
+}
@@ -0,0 +1,63 @@
+<?php
+/**
+ * (c) Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+namespace Vespolina\Entity\Partner;
+
+class Contact implements ContactInterface
+{
+ protected $name;
+ protected $email;
+ protected $phone;
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setName($name)
+ {
+ $this->name = $name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getName()
+ {
+ return $this->name;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getEmail()
+ {
+ return $this->email;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setEmail($email)
+ {
+ $this->email = $email;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function getPhone()
+ {
+ return $this->phone;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function setPhone($phone)
+ {
+ $this->phone = $phone;
+ }
+}
@@ -0,0 +1,52 @@
+<?php
+/**
+ * (c) Vespolina Project http://www.vespolina-project.org
+ *
+ * This source file is subject to the MIT license that is bundled
+ * with this source code in the file LICENSE.
+ */
+namespace Vespolina\Entity\Partner;
+
+interface ContactInterface
+{
+ /**
+ * Sets the name of the contact
+ *
+ * @param string $name
+ */
+ function setName($name);
+
+ /**
+ * The name of the contact
+ *
+ * @return string
+ */
+ function getName();
+
+ /**
+ * Sets the contacts phone number
+ *
+ * @param string $phone
+ */
+ function setPhone($phone);
+
+ /**
+ * Primary phone number
+ *
+ * @return string
+ */
+ function getPhone();
+
+ /**
+ * Sets the contacts emailaddress
+ * @param string $email
+ */
+ function setEmail($email);
+
+ /**
+ * Primary email address for communication
+ *
+ * @return string
+ */
+ function getEmail();
+}
Oops, something went wrong.

0 comments on commit 48b4130

Please sign in to comment.