/**
  * Add specific attributes
  *
  * @param string $strKey
  * @param mixed  $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'category':
         case 'bounds':
         case 'componentRestrictions':
         case 'callback':
         case 'use_route_type':
         case 'use_street_number_type':
         case 'use_locality_type':
         case 'use_administrative_area_level_1_type':
         case 'use_country_type':
         case 'use_postal_code_type':
         case 'use_lat_long':
             $this->options[$strKey] = $varValue;
             break;
         case 'use_route':
         case 'use_street_number':
         case 'use_locality':
         case 'use_administrative_area_level_1':
         case 'use_country':
         case 'use_postal_code':
             $this->useFields[substr($strKey, 4)] = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
예제 #2
0
 /**
  * Make sure we have the correct value
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'value':
             $this->varValue = Number::create($varValue);
             break;
     }
     parent::__set($strKey, $varValue);
 }
 /**
  * @param string $strKey
  * @param mixed $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'maxlength':
             if ($varValue > 0) {
                 $this->arrAttributes['maxlength'] = $varValue;
             }
             break;
         case 'mandatory':
             if ($varValue) {
                 $this->arrAttributes['required'] = 'required';
             } else {
                 unset($this->arrAttributes['required']);
             }
             parent::__set($strKey, $varValue);
             break;
         case 'placeholder':
             $this->arrAttributes['placeholder'] = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
예제 #4
0
파일: TagField.php 프로젝트: AgentCT/tags
 /**
  * Add specific attributes
  * @param string
  * @param mixed
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'isTag':
             $this->blnSubmitInput = !$varValue;
             break;
         case 'table':
             $this->strTagTable = $varValue;
             break;
         case 'value':
             $this->varValue = implode(",", array_filter(trimsplit(",", $varValue), 'strlen'));
             break;
         case 'maxtags':
             $this->intMaxTags = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }
 /**
  * Add specific attributes
  *
  * @param string $strKey
  * @param mixed  $varValue
  */
 public function __set($strKey, $varValue)
 {
     switch ($strKey) {
         case 'format':
         case 'startDate':
         case 'endDate':
         case 'excludeCSS':
         case 'excludeJS':
         case 'autoclose':
         case 'beforeShowDay':
         case 'beforeShowMonth':
         case 'beforeShowYear':
         case 'beforeShowDecade':
         case 'beforeShowCentury':
         case 'calendarWeeks':
         case 'clearBtn':
         case 'container':
         case 'datesDisabled':
         case 'daysOfWeekDisabled':
         case 'daysOfWeekHighlighted':
         case 'defaultViewDate':
         case 'disableTouchKeyboard':
         case 'enableOnReadonly':
         case 'forceParse':
         case 'assumeNearbyYear':
         case 'assumeNearbyYear_number':
         case 'immediateUpdates':
         case 'inputs':
         case 'keyboardNavigation':
         case 'language':
         case 'maxViewMode':
         case 'minViewMode':
         case 'multidate':
         case 'multidate_count':
         case 'multidateSeparator':
         case 'orientation':
         case 'showOnFocus':
         case 'startView':
         case 'templates':
         case 'title':
         case 'todayBtn':
         case 'todayHighlight':
         case 'toggleActive':
         case 'weekStart':
         case 'zIndexOffset':
             $this->options[$strKey] = $varValue;
             break;
         default:
             parent::__set($strKey, $varValue);
             break;
     }
 }