Example #1
0
 /**
  * @param CurrencyEntity $currency
  * @return Currency
  */
 public static function createFromCurrencyEntity(CurrencyEntity $currency)
 {
     $struct = new self();
     $struct->setId($currency->getId());
     $struct->setName($currency->getName());
     $struct->setCurrency($currency->getCurrency());
     $struct->setFactor($currency->getFactor());
     $struct->setSymbol($currency->getSymbol());
     return $struct;
 }
Example #2
0
 /**
  * Converts a currency doctrine model to a currency struct
  *
  * @param \Shopware\Models\Shop\Currency $currency
  * @return Struct\Currency
  */
 public function convertCurrency(Models\Shop\Currency $currency)
 {
     $struct = new Struct\Currency();
     $struct->setId($currency->getId());
     $struct->setName($currency->getName());
     $struct->setCurrency($currency->getCurrency());
     $struct->setFactor($currency->getFactor());
     $struct->setSymbol($currency->getSymbol());
     return $struct;
 }
 /**
  * {@inheritDoc}
  */
 public function getFactor()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getFactor', array());
     return parent::getFactor();
 }