本文整理汇总了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);
}