Example #1
0
 /**
  * The resource link is the connection link to the database.
  *
  * @param resource $resourceLink        	
  */
 public function __construct($resourceLink)
 {
     Customweb_Core_Assert::notNull($resourceLink);
     $this->link = $resourceLink;
 }
 protected final function checkAddress(Customweb_Payment_Authorization_OrderContext_IAddress $address)
 {
     Customweb_Core_Assert::hasLength($address->getFirstName(), "The address must contain a firstname.");
     Customweb_Core_Assert::hasLength($address->getLastName(), "The address must contain a lastname.");
     Customweb_Core_Assert::hasLength($address->getStreet(), "The address must contain a street.");
     Customweb_Core_Assert::hasLength($address->getPostCode(), "The address must contain a post code.");
     Customweb_Core_Assert::hasLength($address->getCountryIsoCode(), "The address must contain a country.");
     Customweb_Core_Assert::hasLength($address->getCity(), "The address must contain a city.");
 }
Example #3
0
 /**
  * Accepts any language input (IETF code, ISO Code or any other language name)
  * 
  * @param string $language
  * @throws Exception
  */
 public function __construct($language)
 {
     $language = (string) $language;
     Customweb_Core_Assert::hasLength($language, "The given language is empty.");
     $this->language = $language;
 }