function getComponent( $arg1=FALSE, $arg2=FALSE ) {
    $index = $argType = null;
    if ( !$arg1 ) {
      $argType = 'INDEX';
      $index   = $this->compix['INDEX'] =
        ( isset( $this->compix['INDEX'] )) ? $this->compix['INDEX'] + 1 : 1;
    }
    elseif ( ctype_digit( (string) $arg1 )) {
      $argType = 'INDEX';
      $index   = (int) $arg1;
      unset( $this->compix );
    }
    elseif(( strlen( $arg1 ) <= strlen( 'vfreebusy' )) && ( FALSE === strpos( $arg1, '@' ))) {
      unset( $this->compix['INDEX'] );
      $argType = strtolower( $arg1 );
      if( !$arg2 )
        $index = $this->compix[$argType] =
        ( isset( $this->compix[$argType] )) ? $this->compix[$argType] + 1 : 1;
      else
        $index = (int) $arg2;
    }
    $index  -= 1;
    $ckeys =  array_keys( $this->components );
    if( !empty( $index) && ( $index > end(  $ckeys )))
      return FALSE;
    $cix1gC = 0;
    foreach ( $this->components as $cix => $component) {
      unset( $component->propix );
      if(( 'INDEX' == $argType ) && ( $index == $cix ))
        return $component->copy();
      elseif( $argType == $component->objName ) {
         if( $index == $cix1gC )
           return $component->copy();
         $cix1gC++;
      }
      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
        unset( $component->propix );
        return $component->copy();
      }
    }
            /* not found.. . */
    unset( $this->compix );
    return false;
  }
function getComponent( $arg1=FALSE, $arg2=FALSE ) {
    $index = $argType = null;
    if ( !$arg1 ) {
      $argType = 'INDEX';
      $index   = $this->compix['INDEX'] =
        ( isset( $this->compix['INDEX'] )) ? $this->compix['INDEX'] + 1 : 1;
    }
    elseif ( ctype_digit( (string) $arg1 )) {
      $argType = 'INDEX';
      $index   = (int) $arg1;
      unset( $this->compix );
    }
    elseif(( strlen( $arg1 ) <= strlen( 'vfreebusy' )) && ( FALSE === strpos( $arg1, '@' ))) {
      unset( $this->compix['INDEX'] );
      $argType = strtolower( $arg1 );
      if( !$arg2 )
        $index = $this->compix[$argType] =
        ( isset( $this->compix[$argType] )) ? $this->compix[$argType] + 1 : 1;
      else
        $index = (int) $arg2;
    }
    $index  -= 1;
    $ckeys =  array_keys( $this->components );
    if( !empty( $index) && ( $index > end(  $ckeys )))
      return FALSE;
    $cix1gC = 0;
    foreach ( $this->components as $cix => $component) {
      unset( $component->propix );
      if(( 'INDEX' == $argType ) && ( $index == $cix ))
        return $component->copy();
      elseif( $argType == $component->objName ) {
         if( $index == $cix1gC )
           return $component->copy();
         $cix1gC++;
      }
      elseif( !$argType && ($arg1 == $component->getProperty( 'uid' ))) {
        unset( $component->propix );
        return $component->copy();
      }
    }
            /* not found.. . */
    unset( $this->compix );
    return false;
  }
function getComponent ( $ arg1 = FALSE , $ arg2 = FALSE ) { $ index = $ argType = null ; if ( ! $ arg1 ) { $ argType = 'INDEX' ; $ index = $ this -> compix [ 'INDEX' ] = ( isset ( $ this -> compix [ 'INDEX' ] ) ) ? $ this -> compix [ 'INDEX' ] + 1 : 1 ; } elseif ( ctype_digit ( ( string ) $ arg1 ) ) { $ argType = 'INDEX' ; $ index = ( int ) $ arg1 ; unset ( $ this -> compix ) ; } elseif ( ( strlen ( $ arg1 ) <= strlen ( 'vfreebusy' ) ) && ( FALSE === strpos ( $ arg1 , '@' ) ) ) { unset ( $ this -> compix [ 'INDEX' ] ) ; $ argType = strtolower ( $ arg1 ) ; if ( ! $ arg2 ) $ index = $ this -> compix [ $ argType ] = ( isset ( $ this -> compix [ $ argType ] ) ) ? $ this -> compix [ $ argType ] + 1 : 1 ; else $ index = ( int ) $ arg2 ; } $ index -= 1 ; $ ckeys = array_keys ( $ this -> components ) ; if ( ! empty ( $ index ) && ( $ index > end ( $ ckeys ) ) ) return FALSE ; $ cix1gC = 0 ; foreach ( $ this -> components as $ cix => $ component ) { unset ( $ component -> propix ) ; if ( ( 'INDEX' == $ argType ) && ( $ index == $ cix ) ) return $ component -> copy ( ) ; elseif ( $ argType == $ component -> objName ) { if ( $ index == $ cix1gC ) return $ component -> copy ( ) ; $ cix1gC ++ ; } elseif ( ! $ argType && ( $ arg1 == $ component -> getProperty ( 'uid' ) ) ) { unset ( $ component -> propix ) ; return $ component -> copy ( ) ; } } /* not found.. . */ unset ( $ this -> compix ) ; return false ; }
get calendar component from container

@author Kjell-Inge Gustafsson <ical@kigkonsult.se>
@since 2.2.16 - 2007-11-11
@param mixed $arg1 optional, ordno/component type/ component uid
@param mixed $arg2 optional, ordno if arg1 = component type
@return object
get calendar component from container