本文整理匯總了PHP中Tinebase_Record_Abstract::__get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tinebase_Record_Abstract::__get方法的具體用法?PHP Tinebase_Record_Abstract::__get怎麽用?PHP Tinebase_Record_Abstract::__get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tinebase_Record_Abstract
的用法示例。
在下文中一共展示了Tinebase_Record_Abstract::__get方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: getPaymentMethodFromRecordOrDefault
/**
*
* Get the payment method (foreign record) in given record, or use default, if not set
* @param Tinebase_Record_Abstract $record
* @param unknown_type $fieldForeignId
*/
public function getPaymentMethodFromRecordOrDefault(Tinebase_Record_Abstract $record, $fieldForeignId)
{
if ($record->__get($fieldForeignId)) {
return $record->getForeignRecord($fieldForeignId, $this);
}
return $this->getDefaultPaymentMethod();
}
示例2: appendDependentRecords
/**
* Append contacts by foreign key (record embedding)
*
* @param Tinebase_Record_Abstract $record
* @return void
*/
protected function appendDependentRecords($record)
{
if ($record->__get('batch_dta_id')) {
$this->appendForeignRecordToRecord($record, 'batch_dta_id', 'batch_dta_id', 'id', new Billing_Backend_BatchJobDta());
}
if ($record->__get('open_item_id')) {
$this->appendForeignRecordToRecord($record, 'open_item_id', 'open_item_id', 'id', new Billing_Backend_OpenItem());
}
if ($record->__get('payment_id')) {
$this->appendForeignRecordToRecord($record, 'payment_id', 'payment_id', 'id', new Billing_Backend_Payment());
}
}
示例3: __get
/**
* gets record related properties
*
* @param string _name of property
* @throws Tinebase_Exception_UnexpectedValue
* @return mixed value of property
*/
public function __get($_name)
{
$result = parent::__get($_name);
if ($_name === 'structure' && empty($result)) {
$result = $this->_fetchStructure();
}
return $result;
}
示例4: __get
/**
* gets record related properties
*
* @param string _name of property
* @throws Tinebase_Exception_UnexpectedValue
* @return mixed value of property
*/
public function __get($_name)
{
$value = parent::__get($_name);
switch ($_name) {
case 'interval':
return (int) $value > 1 ? (int) $value : 1;
break;
default:
return $value;
break;
}
}
示例5: __get
/**
* (non-PHPdoc)
* @see Tinebase_Record_Abstract::__get()
*/
public function __get($_name)
{
if ($_name == 'method' && !$this->_properties['method'] && $this->_properties['ics']) {
$this->getEvent();
}
return parent::__get($_name);
}