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


PHP Tinebase_Record_Abstract::__set方法代碼示例

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


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

示例1: __set

 /**
  * sets record related properties
  * 
  * @param string _name of property
  * @param mixed _value of property
  * @throws Tinebase_Exception_InvalidArgument
  */
 public function __set($_name, $_value)
 {
     switch ($_name) {
         case 'application_id':
             $_value = Tinebase_Model_Application::convertApplicationIdToInt($_value);
     }
     parent::__set($_name, $_value);
 }
開發者ID:,項目名稱:,代碼行數:15,代碼來源:

示例2: __set

 /**
  * sets record related properties
  * 
  * @param string _name of property
  * @param mixed _value of property
  * @throws Tinebase_Exception_InvalidArgument
  */
 public function __set($_name, $_value)
 {
     switch ($_name) {
         case 'application_id':
             $_value = Tinebase_Model_Application::convertApplicationIdToInt($_value);
     }
     /**
      * @TODO
      * - ask model for datatype
      * - cope with record/recordSet
      */
     if (is_string($_value) && strlen($_value) == 19 && preg_match('/^\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}$/', $_value)) {
         $_value = new Tinebase_DateTime($_value);
     }
     parent::__set($_name, $_value);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:23,代碼來源:ModificationLog.php

示例3: __set

 /**
  * set properties and convert them into internal representatin on the fly
  *
  * @param string $_name
  * @param mixed $_value
  * @return void
  */
 public function __set($_name, $_value)
 {
     switch ($_name) {
         case 'until':
             if (!empty($_value)) {
                 if ($_value instanceof DateTime) {
                     $this->_properties['until'] = $_value;
                 } else {
                     $this->_properties['until'] = new Tinebase_DateTime($_value);
                 }
             }
             break;
         case 'bymonth':
         case 'bymonthday':
             if (!empty($_value)) {
                 $values = explode(',', $_value);
                 $this->_properties[$_name] = (int) $values[0];
             }
             break;
         default:
             parent::__set($_name, $_value);
             break;
     }
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:31,代碼來源:Rrule.php

示例4: __set

 /**
  * sets record related properties
  * 
  * @param string _name of property
  * @param mixed _value of property
  * @throws Tinebase_Exception_UnexpectedValue
  * @return void
  */
 public function __set($_name, $_value)
 {
     // ensure exdate as array
     if ($_name == 'exdate' && !empty($_value) && !is_array($_value) && !$_value instanceof Tinebase_Record_RecordSet) {
         $_value = array($_value);
     }
     if ($_name == 'attendee' && is_array($_value)) {
         $_value = new Tinebase_Record_RecordSet('Calendar_Model_Attender', $_value);
     }
     if ($_name == 'rrule' && is_string($_value) && !empty($_value)) {
         // normalize rrule
         $_value = new Calendar_Model_Rrule($_value);
         $_value = (string) $_value;
     }
     parent::__set($_name, $_value);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:24,代碼來源:Event.php

示例5: __set

 /**
  * (non-PHPdoc)
  * @see Tinebase_Record_Abstract::__set()
  */
 public function __set($_name, $_value)
 {
     if ($_name == 'ics') {
         unset($this->event);
     }
     if ($_name == 'method') {
         $_value = trim(strtoupper($_value));
     }
     return parent::__set($_name, $_value);
 }
開發者ID:rodrigofns,項目名稱:ExpressoLivre3,代碼行數:14,代碼來源:iMIP.php

示例6: __set

 /**
  * Overwrites the __set Method from Tinebase_Record_Abstract
  * Also sets n_fn and n_fileas when org_name, n_given or n_family should be set
  * @see Tinebase_Record_Abstract::__set()
  * @param string $_name of property
  * @param mixed $_value of property
  */
 public function __set($_name, $_value)
 {
     switch ($_name) {
         case 'n_given':
             $resolved = $this->_resolveAutoValues(array('n_given' => $_value, 'n_family' => $this->__get('n_family'), 'org_name' => $this->__get('org_name')));
             parent::__set('n_fn', $resolved['n_fn']);
             parent::__set('n_fileas', $resolved['n_fileas']);
             break;
         case 'n_family':
             $resolved = $this->_resolveAutoValues(array('n_family' => $_value, 'n_given' => $this->__get('n_given'), 'org_name' => $this->__get('org_name')));
             parent::__set('n_fn', $resolved['n_fn']);
             parent::__set('n_fileas', $resolved['n_fileas']);
             break;
         case 'org_name':
             $resolved = $this->_resolveAutoValues(array('org_name' => $_value, 'n_given' => $this->__get('n_given'), 'n_family' => $this->__get('n_family')));
             parent::__set('n_fn', $resolved['n_fn']);
             parent::__set('n_fileas', $resolved['n_fileas']);
             break;
         default:
             // normalize telephone numbers
             if (!empty($_value) && strpos($_name, 'tel_') === 0 && strpos($_name, '_normalized') === false) {
                 parent::__set($_name . '_normalized', static::normalizeTelephoneNoCountry($_value));
             }
             break;
     }
     parent::__set($_name, $_value);
 }
開發者ID:ingoratsdorf,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:34,代碼來源:Contact.php

示例7: __set

 /**
  * Overwrites the __set Method from Tinebase_Record_Abstract
  * Also sets n_fn and n_fileas when org_name, n_given or n_family should be set
  * @see Tinebase_Record_Abstract::__set()
  */
 public function __set($_name, $_value)
 {
     switch ($_name) {
         case 'n_given':
             $resolved = $this->_resolveAutoValues(array('n_given' => $_value, 'n_family' => $this->__get('n_family'), 'org_name' => $this->__get('org_name')));
             parent::__set('n_fn', $resolved['n_fn']);
             parent::__set('n_fileas', $resolved['n_fileas']);
             break;
         case 'n_family':
             $resolved = $this->_resolveAutoValues(array('n_family' => $_value, 'n_given' => $this->__get('n_given'), 'org_name' => $this->__get('org_name')));
             parent::__set('n_fn', $resolved['n_fn']);
             parent::__set('n_fileas', $resolved['n_fileas']);
             break;
         case 'org_name':
             $resolved = $this->_resolveAutoValues(array('org_name' => $_value, 'n_given' => $this->__get('n_given'), 'n_family' => $this->__get('n_family')));
             parent::__set('n_fn', $resolved['n_fn']);
             parent::__set('n_fileas', $resolved['n_fileas']);
     }
     parent::__set($_name, $_value);
 }
開發者ID:bitExpert,項目名稱:Tine-2.0-Open-Source-Groupware-and-CRM,代碼行數:25,代碼來源:Contact.php


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