set calendar property x-prop

@author Kjell-Inge Gustafsson <ical@kigkonsult.se>
@since 2.0.7 - 2007-06-21
@param string $label
@param string $value
@param array $params optional
@return void
8047
function setXprop( $label, $value, $params=FALSE ) {
    if( empty( $label ) || empty( $value ))
      return;
    $xprop = array( 'value' => $value );
    $toolbox = new calendarComponent();
    $xprop['params'] = $toolbox->_setParams( $params );
    $this->xprop[$label] = $xprop;
  }
538948
function setPriority( $value, $params=FALSE  ) {
    $this->priority['value']  = $value;
    $this->priority['params'] = $this->_setParams( $params );
  }
472147
private function setTimeInfo(int $value, array $param)
    {
        if (!$this->certeza[$param[0]] && !isset($this->data[$param[0]])) {
            $this->data[$param[0]] = $value;

        } elseif (!$this->certeza[$param[1]] && !isset($this->data[$param[1]])) {
            $temp = $this->data[$param[0]];
            $this->data[$param[0]] = $value;
            $this->data[$param[1]] = $temp;

        } elseif ($this->certeza[$param[0]]) {
            if (!$this->certeza[$param[1]]) {
                $this->data[$param[1]] = $value;
            }

        } elseif ($this->certeza[$param[1]]) {
            if (!$this->certeza[$param[0]]) {
                $this->data[$param[0]] = $value;
            }
        }
    }
461692
public function setProperty($propName, $value)
    {
        if (self::isAttribute($propName)) {
            $this->setAttribute($propName, $value);
        } else {
            if ($setterName = $this->setterExists($propName)) {
                $this->$setterName($value);
            } elseif (self::hasPublicProperty($propName)) {
                $this->$propName = $value;
            } else {
                throw new Exception\RuntimeException(
                    sprintf("Can't write unknown property '%s' for model %s", $propName, get_called_class())
                );
            }
        }
    }
224147
function setRepeat( $value, $params=FALSE ) {
    $this->repeat['value']  = $value;
    $this->repeat['params'] = $this->_setParams( $params );
  }
1191549
public function setValue($value)
    {
        $this->value = $value;
        $this->listeners->executeAll($this->value);
    }
74788
function setAttach( $value, $params=FALSE) {
    $attach           = array();
    $attach['value']  = $value ;
    $attach['params'] = $this->_setParams( $params );
    $this->attach[]   = $attach;
  }
1051612
public function bind($para, $value)
    {
        if (is_string($para)) {
            $this->parameters[sizeof($this->parameters)] = ":" . $para . "\x7F" . $value;
        } else {
            $this->parameters[sizeof($this->parameters)] = $para . "\x7F" . $value;
        }
    }
123137
public function set( $key, $value, $param = null ) 
	{
	    CCArr::set( $key, $value, $this->_data );
	}
500495
public function set($property, $value)
    {
        $properties = $this->getValue('properties', []);
        $properties[$property] = [$value];
        $this->setValue('properties', $properties);
    }
1184689
private function addItem($value, $label, $parentKey = null)
    {
        if ($parentKey) {
            $this->items[$parentKey][$value] = $label;
        } else {
            $this->items[$value] = $label;
        }
    }
1052320
protected function setPropValue($obj, $propName, $value)
    {
        if (method_exists($obj, 'set' . $propName)) {
            $obj->{'set' . $propName}($value);
        } elseif (isset($obj->{$propName}) || $obj instanceof stdClass) {
            $obj->{$propName} = $value;
        } else {
            // Check if source property have property case name different from target
            $className = get_class($obj);
            if (!isset($this->propNameLower[$className])) {
                $this->propNameLower[$className] = [];

                $classVars = get_class_vars($className);
                foreach ($classVars as $varKey => $varValue) {
                    $this->propNameLower[$className][strtolower($varKey)] = $varKey;
                }
            }

            $propLower = strtolower($propName);
            if (isset($this->propNameLower[$className][$propLower])) {
                $obj->{$this->propNameLower[$className][$propLower]} = $value;
            }
        }
    }
393536
function add_info($label, $value) {
    $method = "Set$label";
    if ( in_array("Title", "Author", "Keywords", "Subject") && method_exists($this->_pdf, $method) ) {
      $this->_pdf->$method($value);
    }
  }
662007
public function set($name, $value, $params = [])
    {
        $this->add(new Property($name, $value, $params));

        return $this;
    }
1292751
protected void setProperty(JKLocale locale, final String propName, final String value) {
		logger.trace("Add label :", propName, " , with value: ", value);
		Properties prop = getLables(locale);
		prop.setProperty(JKCollectionUtil.fixPropertyKey(propName), fixValue(value));
	}
574781
protected function setParameter($param, $value)
    {
        $param = trim($param);
        if (!strlen($param)) {
            throw new \RuntimeException(sprintf('Invalid fluid template parameter "%s"', $param), 1481551574);
        }

        $this->parameters[$param] = $value;
    }
1320814
function setAttendee( $value, $params=FALSE ) {
    $value = str_replace ( 'MAILTO:', '', $value );
    $value = str_replace ( 'mailto:', '', $value );
    $attendee = array( 'value' => $value, 'params' => array() );
    if( is_array($params )) {
      $optarrays = array();
      foreach( $params as $optparamlabel => $optparamvalue ) {
        $optparamlabel = strtoupper( $optparamlabel );
        switch( $optparamlabel ) {
          case 'MEMBER':
          case 'DELEGATED-TO':
          case 'DELEGATED-FROM':
            if( is_array( $optparamvalue )) {
              foreach( $optparamvalue as $part ) {
                $part = str_replace( 'MAILTO:', '', $part );
                $part = str_replace( 'mailto:', '', $part );
                if(( '"' == $part{0} ) && ( '"' == $part{strlen($part)-1} ))
                  $part = substr( $part, 1, ( strlen($part)-2 ));
                $optarrays[$optparamlabel][] = $part;
              }
            }
            else {
              $part = str_replace( 'MAILTO:', '', $optparamvalue );
              $part = str_replace( 'mailto:', '', $part );
              if(( '"' == $part{0} ) && ( '"' == $part{strlen($part)-1} ))
                $part = substr( $part, 1, ( strlen($part)-2 ));
              $optarrays[$optparamlabel][] = $part;
            }
            break;
          default:
            if( 'SENT-BY' ==  $optparamlabel ) {
              $optparamvalue = str_replace( 'MAILTO:', '', $optparamvalue );
              $optparamvalue = str_replace( 'mailto:', '', $optparamvalue );
            }
            if(( '"' == substr( $optparamvalue, 0, 1 )) &&
               ( '"' == substr( $optparamvalue, -1 )))
              $optparamvalue = substr( $optparamvalue, 1, ( strlen( $optparamvalue ) - 2 ));
            $attendee['params'][$optparamlabel] = $optparamvalue;
            break;
        } // end switch( $optparamlabel.. .
      } // end foreach( $optparam.. .
      foreach( $optarrays as $optparamlabel => $optparams )
        $attendee['params'][$optparamlabel] = $optparams;
    }
        // remove defaults
    if( isset( $attendee['params']['CUTYPE' ] )  &&
       ( strtoupper( $attendee['params']['CUTYPE' ] )  == 'INDIVIDUAL' ))
      unset( $attendee['params']['CUTYPE' ] );
    if( isset( $attendee['params']['PARTSTAT'] ) &&
       ( strtoupper( $attendee['params']['PARTSTAT'] ) == 'NEEDS-ACTION' ))
      unset( $attendee['params']['PARTSTAT'] );
    if( isset( $attendee['params']['ROLE'] )     &&
       ( strtoupper( $attendee['params']['ROLE'] )     == 'REQ-PARTICIPANT' ))
      unset( $attendee['params']['ROLE'] );
    if( isset( $attendee['params']['RSVP'] )     &&
       ( strtoupper( $attendee['params']['RSVP'] )     == 'FALSE' ))
      unset( $attendee['params']['RSVP'] );
        // check language setting
    if( isset( $attendee['params']['CN' ] )) {
      $lang = $this->getConfig( 'language' );
      if( !isset( $attendee['params']['LANGUAGE' ] ) && !empty( $lang ))
        $attendee['params']['LANGUAGE' ] = $lang;
    }
    $this->attendee[] = $attendee;
  }