本文整理汇总了PHP中oxBase::__get方法的典型用法代码示例。如果您正苦于以下问题:PHP oxBase::__get方法的具体用法?PHP oxBase::__get怎么用?PHP oxBase::__get使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类oxBase
的用法示例。
在下文中一共展示了oxBase::__get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __get
/**
* 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: __get
/**
* 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);
}