function deleteComponent( $arg1, $arg2=FALSE  ) {
    $argType = $index = null;
    if ( ctype_digit( (string) $arg1 )) {
      $argType = 'INDEX';
      $index   = (int) $arg1 - 1;
    }
    elseif(( strlen( $arg1 ) <= strlen( 'vfreebusy' )) && ( FALSE === strpos( $arg1, '@' ))) {
      $argType = strtolower( $arg1 );
      $index   = ( !empty( $arg2 ) && ctype_digit( (string) $arg2 )) ? (( int ) $arg2 - 1 ) : 1;
    }
    $cix1dC = 0;
    foreach ( $this->components as $cix => $component) {
      unset( $component->propix );
      if(( 'INDEX' == $argType ) && ( $index == $cix )) {
        unset( $this->components[$cix] );
        return TRUE;
      }
      elseif( $argType == $component->objName ) {
        if( $index == $cix1dC ) {
          unset( $this->components[$cix] );
          return TRUE;
        }
        $cix1dC++;
      }
      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
        unset( $this->components[$cix] );
        return TRUE;
      }
    }
    return FALSE;
  }
function deleteComponent( $arg1, $arg2=FALSE  ) {
    $argType = $index = null;
    if ( ctype_digit( (string) $arg1 )) {
      $argType = 'INDEX';
      $index   = (int) $arg1 - 1;
    }
    elseif(( strlen( $arg1 ) <= strlen( 'vfreebusy' )) && ( FALSE === strpos( $arg1, '@' ))) {
      $argType = strtolower( $arg1 );
      $index   = ( !empty( $arg2 ) && ctype_digit( (string) $arg2 )) ? (( int ) $arg2 - 1 ) : 1;
    }
    $cix1dC = 0;
    foreach ( $this->components as $cix => $component) {
      unset( $component->propix );
      if(( 'INDEX' == $argType ) && ( $index == $cix )) {
        unset( $this->components[$cix] );
        return TRUE;
      }
      elseif( $argType == $component->objName ) {
        if( $index == $cix1dC ) {
          unset( $this->components[$cix] );
          return TRUE;
        }
        $cix1dC++;
      }
      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
        unset( $this->components[$cix] );
        return TRUE;
      }
    }
    return FALSE;
  }
function deleteComponent ( $ arg1 , $ arg2 = FALSE ) { $ argType = $ index = null ; if ( ctype_digit ( ( string ) $ arg1 ) ) { $ argType = 'INDEX' ; $ index = ( int ) $ arg1 - 1 ; } elseif ( ( strlen ( $ arg1 ) <= strlen ( 'vfreebusy' ) ) && ( FALSE === strpos ( $ arg1 , '@' ) ) ) { $ argType = strtolower ( $ arg1 ) ; $ index = ( ! empty ( $ arg2 ) && ctype_digit ( ( string ) $ arg2 ) ) ? ( ( int ) $ arg2 - 1 ) : 1 ; } $ cix1dC = 0 ; foreach ( $ this -> components as $ cix => $ component ) { unset ( $ component -> propix ) ; if ( ( 'INDEX' == $ argType ) && ( $ index == $ cix ) ) { unset ( $ this -> components [ $ cix ] ) ; return TRUE ; } elseif ( $ argType == $ component -> objName ) { if ( $ index == $ cix1dC ) { unset ( $ this -> components [ $ cix ] ) ; return TRUE ; } $ cix1dC ++ ; } elseif ( ! $ argType && ( $ arg1 == $ component -> getProperty ( 'uid' ) ) ) { unset ( $ this -> components [ $ cix ] ) ; return TRUE ; } } return FALSE ; }
delete calendar component from container

@author Kjell-Inge Gustafsson <ical@kigkonsult.se>
@since 2.0.4 - 2007-06-14
@param mixed $arg1 ordno / component type / component uid
@param mixed $arg2 optional, ordno if arg1 = component type
@return void
delete calendar component from container