コード例 #1
0
ファイル: oxuserpayment.php プロジェクト: ioanok/symfoxid
 /**
  * Special getter for oxpayments__oxdesc field
  *
  * @param string $sName name of field
  *
  * @return string
  */
 public function __get($sName)
 {
     //due to compatibility with templates
     if ($sName == 'oxpayments__oxdesc') {
         if ($this->_oPayment === null) {
             $this->_oPayment = oxNew('oxpayment');
             $this->_oPayment->load($this->oxuserpayments__oxpaymentsid->value);
         }
         return $this->_oPayment->oxpayments__oxdesc;
     }
     if ($sName == 'aDynValues') {
         if ($this->_aDynValues === null) {
             $this->_aDynValues = $this->getDynValues();
         }
         return $this->_aDynValues;
     }
     return parent::__get($sName);
 }
コード例 #2
0
ファイル: Voucher.php プロジェクト: Alpha-Sys/oxideshop_ce
 /**
  * Extra getter to guarantee compatibility with templates
  *
  * @param string $sName name of variable to get
  *
  * @return string
  */
 public function __get($sName)
 {
     switch ($sName) {
         // simple voucher mapping
         case 'sVoucherId':
             return $this->getId();
             break;
         case 'sVoucherNr':
             return $this->oxvouchers__oxvouchernr;
             break;
         case 'fVoucherdiscount':
             return $this->oxvouchers__oxdiscount;
             break;
     }
     return parent::__get($sName);
 }