function setRrule( $rruleset, $params=FALSE ) {
    $exrule = array();
    foreach( $rruleset as $rrulelabel => $rrulevalue ) {
      $rrulelabel = strtoupper( $rrulelabel );
      if( 'UNTIL'  != $rrulelabel )
        $rrule['value'][$rrulelabel] = $rrulevalue;
      elseif( is_array( $rrulevalue ) &&
            (( 3 == count( $rrulevalue )) ||
             ( 6 == count( $rrulevalue )) ||
             ( 7 == count( $rrulevalue )) ||
             ( array_key_exists( 'year', $rrulevalue )))) {
        $parno = ( 3 < count( $rrulevalue )) ? 7 : 3 ; // datetime / date
        $date  = $this->_date_time_array( $rrulevalue, $parno );
        if(( 3 < count( $date )) && !isset( $date['tz'] ))
          $date['tz'] = 'Z';
        $rrule['value'][$rrulelabel] = $date;
      }
      elseif( is_array( $rrulevalue ) && isset( $rrulevalue['timestamp'] )) {
        $date  = $this->_date_time_string( date( 'Y-m-d H:i:s', $rrulevalue['timestamp'] ), 6 );
        $date['tz'] = 'Z';
        $rrule['value'][$rrulelabel] = $date;
      }
      elseif( 8 <= strlen( trim( $rrulevalue ))) { // ex. 2006-08-03 10:12:18
        $date = $this->_date_time_string( $rrulevalue );
        if(( 3 < count( $date )) && !isset( $date['tz'] ))
          $date['tz'] = 'Z';
        $rrule['value'][$rrulelabel] = $date;
      }
    }
    $rrule['params'] = $this->_setParams( $params );
    $this->rrule[]   = $rrule;
  }
function setRrule( $rruleset, $params=FALSE ) {
    $exrule = array();
    foreach( $rruleset as $rrulelabel => $rrulevalue ) {
      $rrulelabel = strtoupper( $rrulelabel );
      if( 'UNTIL'  != $rrulelabel )
        $rrule['value'][$rrulelabel] = $rrulevalue;
      elseif( is_array( $rrulevalue ) &&
            (( 3 == count( $rrulevalue )) ||
             ( 6 == count( $rrulevalue )) ||
             ( 7 == count( $rrulevalue )) ||
             ( array_key_exists( 'year', $rrulevalue )))) {
        $parno = ( 3 < count( $rrulevalue )) ? 7 : 3 ; // datetime / date
        $date  = $this->_date_time_array( $rrulevalue, $parno );
        if(( 3 < count( $date )) && !isset( $date['tz'] ))
          $date['tz'] = 'Z';
        $rrule['value'][$rrulelabel] = $date;
      }
      elseif( is_array( $rrulevalue ) && isset( $rrulevalue['timestamp'] )) {
        $date  = $this->_date_time_string( date( 'Y-m-d H:i:s', $rrulevalue['timestamp'] ), 6 );
        $date['tz'] = 'Z';
        $rrule['value'][$rrulelabel] = $date;
      }
      elseif( 8 <= strlen( trim( $rrulevalue ))) { // ex. 2006-08-03 10:12:18
        $date = $this->_date_time_string( $rrulevalue );
        if(( 3 < count( $date )) && !isset( $date['tz'] ))
          $date['tz'] = 'Z';
        $rrule['value'][$rrulelabel] = $date;
      }
    }
    $rrule['params'] = $this->_setParams( $params );
    $this->rrule[]   = $rrule;
  }
function setRrule ( $ rruleset , $ params = FALSE ) { $ exrule = array ( ) ; foreach ( $ rruleset as $ rrulelabel => $ rrulevalue ) { $ rrulelabel = strtoupper ( $ rrulelabel ) ; if ( 'UNTIL' != $ rrulelabel ) $ rrule [ 'value' ] [ $ rrulelabel ] = $ rrulevalue ; elseif ( is_array ( $ rrulevalue ) && ( ( 3 == count ( $ rrulevalue ) ) || ( 6 == count ( $ rrulevalue ) ) || ( 7 == count ( $ rrulevalue ) ) || ( array_key_exists ( 'year' , $ rrulevalue ) ) ) ) { $ parno = ( 3 < count ( $ rrulevalue ) ) ? 7 : 3 ; // datetime / date $ date = $ this -> _date_time_array ( $ rrulevalue , $ parno ) ; if ( ( 3 < count ( $ date ) ) && ! isset ( $ date [ 'tz' ] ) ) $ date [ 'tz' ] = 'Z' ; $ rrule [ 'value' ] [ $ rrulelabel ] = $ date ; } elseif ( is_array ( $ rrulevalue ) && isset ( $ rrulevalue [ 'timestamp' ] ) ) { $ date = $ this -> _date_time_string ( date ( 'Y-m-d H:i:s' , $ rrulevalue [ 'timestamp' ] ) , 6 ) ; $ date [ 'tz' ] = 'Z' ; $ rrule [ 'value' ] [ $ rrulelabel ] = $ date ; } elseif ( 8 <= strlen ( trim ( $ rrulevalue ) ) ) { // ex. 2006-08-03 10:12:18 $ date = $ this -> _date_time_string ( $ rrulevalue ) ; if ( ( 3 < count ( $ date ) ) && ! isset ( $ date [ 'tz' ] ) ) $ date [ 'tz' ] = 'Z' ; $ rrule [ 'value' ] [ $ rrulelabel ] = $ date ; } } $ rrule [ 'params' ] = $ this -> _setParams ( $ params ) ; $ this -> rrule [ ] = $ rrule ; }
set calendar component property rrule

@author Kjell-Inge Gustafsson <ical@kigkonsult.se>
@since 0.9.18 - 2007-03-18
@param array $rruleset
@param array $params optional
@return void
set calendar component property rrule