當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Tinebase_Record_Abstract::setFromArray方法代碼示例

本文整理匯總了PHP中Tinebase_Record_Abstract::setFromArray方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tinebase_Record_Abstract::setFromArray方法的具體用法?PHP Tinebase_Record_Abstract::setFromArray怎麽用?PHP Tinebase_Record_Abstract::setFromArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Tinebase_Record_Abstract的用法示例。


在下文中一共展示了Tinebase_Record_Abstract::setFromArray方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setFromArray

 /**
  * convert remark to array if json encoded
  * 
  * @see Tinebase_Record_Abstract::setFromArray
  *
  * @param array $_data            the new data to set
  * 
  * @todo    always json::encode remarks? / add options field that is always json encoded
  */
 public function setFromArray(array $_data)
 {
     parent::setFromArray($_data);
     if ($this->remark && is_string($this->remark) && strpos($this->remark, '{') === 0) {
         $this->remark = Zend_Json::decode($this->remark);
     }
 }
開發者ID:,項目名稱:,代碼行數:16,代碼來源:

示例2: setFromArray

 public function setFromArray(array $_data)
 {
     if (empty($_data['termination_date']) || $_data['termination_date'] == "") {
         unset($_data['termination_date']);
     }
     parent::setFromArray($_data);
 }
開發者ID:carriercomm,項目名稱:Billing-5,代碼行數:7,代碼來源:AccountBooking.php

示例3: setFromArray

 /**
  * (non-PHPdoc)
  * @see tine20/Tinebase/Record/Abstract::setFromArray()
  */
 public function setFromArray(array $_data)
 {
     if (isset($_data['records']) && is_array($_data['records'])) {
         $_data['records'] = new Tinebase_Record_RecordSet($this->_keyFieldRecordModel, $_data['records'], TRUE);
     }
     parent::setFromArray($_data);
 }
開發者ID:hernot,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:11,代碼來源:KeyField.php

示例4: setFromArray

 /**
  * (non-PHPdoc)
  * @see Tinebase/Record/Tinebase_Record_Abstract#setFromArray($_data)
  */
 public function setFromArray(array $_data)
 {
     parent::setFromArray($_data);
     // always set url here (or is there a better place?)
     if ($this->getId()) {
         $this->url = $this->getDownloadUrl();
     }
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:12,代碼來源:DownloadLink.php

示例5: setFromArray

 /**
  * (non-PHPdoc)
  * @see Tinebase/Record/Tinebase_Record_Abstract#setFromArray($_data)
  */
 public function setFromArray(array $_data)
 {
     parent::setFromArray($_data);
     // always set url here (or is there a better place?)
     if ($this->getId()) {
         $this->url = Tinebase_Core::getHostname() . '/download/show/' . $this->getId();
     }
 }
開發者ID:bitExpert,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:12,代碼來源:DownloadLink.php

示例6: setFromArray

 /**
  * sets the record related properties from user generated input.
  * 
  * Input-filtering and validation by Zend_Filter_Input can enabled and disabled
  *
  * @param array $_data            the new data to set
  */
 public function setFromArray(array $_data)
 {
     foreach (array('emailForwards', 'emailAliases') as $arrayField) {
         if (isset($_data[$arrayField]) && !is_array($_data[$arrayField])) {
             $_data[$arrayField] = explode(',', preg_replace('/ /', '', $_data[$arrayField]));
         }
     }
     parent::setFromArray($_data);
 }
開發者ID:bitExpert,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:16,代碼來源:EmailUser.php

示例7: setFromArray

 public function setFromArray(array $_data)
 {
     if (empty($_data['creditor_id']) || $_data['creditor_id'] == "") {
         unset($_data['creditor_id']);
     }
     if (empty($_data['debitor_id']) || $_data['debitor_id'] == "") {
         unset($_data['debitor_id']);
     }
     parent::setFromArray($_data);
 }
開發者ID:carriercomm,項目名稱:Billing-5,代碼行數:10,代碼來源:StockFlow.php

示例8: setFromArray

 public function setFromArray(array $_data)
 {
     if (empty($_data['signature_date']) || $_data['signature_date'] == "") {
         $_data['signature_date'] = null;
     }
     if (empty($_data['last_usage_date']) || $_data['last_usage_date'] == "") {
         unset($_data['last_usage_date']);
     }
     parent::setFromArray($_data);
 }
開發者ID:carriercomm,項目名稱:Billing-5,代碼行數:10,代碼來源:SepaMandate.php

示例9: setFromArray

 /**
  * (non-PHPdoc)
  * @see tine20/Tinebase/Record/Abstract.php::setFromArray()
  */
 public function setFromArray(array $_data)
 {
     if (isset($_data['definition']) || array_key_exists('definition', $_data)) {
         if (is_string($_data['definition'])) {
             $_data['definition'] = Zend_Json::decode($_data['definition']);
         }
         if (is_array($_data['definition'])) {
             $_data['definition'] = new Tinebase_Config_Struct($_data['definition']);
         }
     }
     return parent::setFromArray($_data);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:16,代碼來源:Config.php

示例10: setFromArray

 /**
  * (non-PHPdoc)
  * @see Tinebase_Record_Abstract::setFromArray()
  */
 public function setFromArray(array $_data)
 {
     parent::setFromArray($_data);
     // sanitize members (could be an array of user arrays -> expecting to contain only ids)
     if (isset($this->members) && is_array($this->members) && count($this->members) > 0 && is_array($this->members[0])) {
         $memberIds = array();
         foreach ($this->members as $member) {
             $memberIds[] = $member['id'];
         }
         $this->members = $memberIds;
     }
 }
開發者ID:bitExpert,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:16,代碼來源:Group.php

示例11: setFromArray

 public function setFromArray(array $_data)
 {
     if (empty($_data['fibu_exp_date']) || $_data['fibu_exp_date'] == "") {
         unset($_data['fibu_exp_date']);
     }
     if (empty($_data['banking_exp_date']) || $_data['banking_exp_date'] == "") {
         unset($_data['banking_exp_date']);
     }
     if (empty($_data['last_monition_date']) || $_data['last_monition_date'] == "") {
         unset($_data['last_monition_date']);
     }
     parent::setFromArray($_data);
 }
開發者ID:carriercomm,項目名稱:Billing-5,代碼行數:13,代碼來源:OpenItem.php

示例12: setFromArray

 public function setFromArray(array $_data)
 {
     if (empty($_data['fibu_exp_date']) || $_data['fibu_exp_date'] == "") {
         $_data['fibu_exp_date'] = null;
     }
     if (empty($_data['order_lock_date']) || $_data['order_lock_date'] == "") {
         $_data['order_lock_date'] = null;
     }
     if (empty($_data['monition_lock_date']) || $_data['monition_lock_date'] == "") {
         $_data['monition_lock_date'] = null;
     }
     parent::setFromArray($_data);
 }
開發者ID:carriercomm,項目名稱:Billing-5,代碼行數:13,代碼來源:Debitor.php

示例13: setFromArray

 /**
  * sets the record related properties from user generated input.
  * 
  * Input-filtering and validation by Zend_Filter_Input can enabled and disabled
  *
  * @param array $_data            the new data to set
  */
 public function setFromArray(array $_data)
 {
     if (isset($_data['filters']) && !$_data['filters'] instanceof Tinebase_Model_Filter_FilterGroup) {
         try {
             $_data['filters'] = $this->getFilterGroup($_data['model'], $_data['filters']);
         } catch (Tinebase_Exception_NotFound $tenf) {
             if (Tinebase_Core::isLogLevel(Zend_Log::WARN)) {
                 Tinebase_Core::getLogger()->warn(__METHOD__ . '::' . __LINE__ . ' Sort out missing ' . $_data['model'] . ' filter: ' . $tenf->getMessage());
             }
         }
     }
     return parent::setFromArray($_data);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:20,代碼來源:PersistentFilter.php

示例14: setFromArray

 public function setFromArray(array $_data)
 {
     if (empty($_data['order_nr']) || $_data['order_nr'] == "") {
         unset($_data['order_nr']);
     }
     if (empty($_data['supplier_order_nr']) || $_data['supplier_order_nr'] == "") {
         unset($_data['supplier_order_nr']);
     }
     if (empty($_data['supply_request_nr']) || $_data['supply_request_nr'] == "") {
         unset($_data['supply_request_nr']);
     }
     if (empty($_data['supply_offer_nr']) || $_data['supply_offer_nr'] == "") {
         unset($_data['supply_offer_nr']);
     }
     if (empty($_data['supply_order_nr']) || $_data['supply_order_nr'] == "") {
         unset($_data['supply_order_nr']);
     }
     if (empty($_data['supply_inc_inv_nr']) || $_data['supply_inc_inv_nr'] == "") {
         unset($_data['supply_inc_inv_nr']);
     }
     if (empty($_data['request_date']) || $_data['request_date'] == "") {
         unset($_data['request_date']);
     }
     if (empty($_data['offer_date']) || $_data['offer_date'] == "") {
         unset($_data['offer_date']);
     }
     if (empty($_data['offer_shipping_date']) || $_data['offer_shipping_date'] == "") {
         unset($_data['offer_shipping_date']);
     }
     if (empty($_data['order_shipping_date']) || $_data['order_shipping_date'] == "") {
         unset($_data['order_shipping_date']);
     }
     if (empty($_data['shipping_date']) || $_data['shipping_date'] == "") {
         unset($_data['shipping_date']);
     }
     if (empty($_data['order_confirm_date']) || $_data['order_confirm_date'] == "") {
         unset($_data['order_confirm_date']);
     }
     if (empty($_data['order_date']) || $_data['order_date'] == "") {
         unset($_data['order_date']);
     }
     if (empty($_data['inc_invoice_date']) || $_data['inc_invoice_date'] == "") {
         unset($_data['inc_invoice_date']);
     }
     if (empty($_data['inc_invoice_postal_date']) || $_data['inc_invoice_postal_date'] == "") {
         unset($_data['inc_invoice_postal_date']);
     }
     parent::setFromArray($_data);
 }
開發者ID:carriercomm,項目名稱:Billing-5,代碼行數:49,代碼來源:SupplyReceipt.php

示例15: setFromArray

 public function setFromArray(array $_data)
 {
     if (empty($_data['article_id']) || $_data['article_id'] == "") {
         unset($_data['article_id']);
     }
     if (empty($_data['order_id']) || $_data['order_id'] == "") {
         unset($_data['order_id']);
     }
     if (empty($_data['weight']) || $_data['weight'] == "") {
         $_data['weight'] = 0;
     }
     if (empty($_data['total_weight']) || $_data['total_weight'] == "") {
         $_data['total_weight'] = 0;
     }
     parent::setFromArray($_data);
 }
開發者ID:carriercomm,項目名稱:Billing-5,代碼行數:16,代碼來源:OrderPosition.php


注:本文中的Tinebase_Record_Abstract::setFromArray方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。