当前位置: 首页>>代码示例>>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;未经允许,请勿转载。