public function getThread($index)
    {
        foreach ($this->_thread as $v) {
            if (isset($v[$index])) {
                reset($v);

                $ob = new stdClass;
                $ob->base = (count($v) > 1) ? key($v) : null;
                $ob->last = false;

                $levels = $out = array();
                $last = 0;

                while (($v2 = current($v)) !== false) {
                    $k2 = key($v);
                    $ob2 = clone $ob;
                    $ob2->level = $v2;
                    $out[$k2] = $ob2;

                    if (($last < $v2) && isset($levels[$v2])) {
                        $out[$levels[$v2]]->last = true;
                    }
                    $levels[$v2] = $k2;
                    $last = $v2;
                    next($v);
                }

                foreach ($levels as $v) {
                    $out[$v]->last = true;
                }

                return $out;
            }
        }

        return array();
    }
public function getThread($index)
    {
        foreach ($this->_thread as $v) {
            if (isset($v[$index])) {
                reset($v);

                $ob = new stdClass;
                $ob->base = (count($v) > 1) ? key($v) : null;
                $ob->last = false;

                $levels = $out = array();
                $last = 0;

                while (($v2 = current($v)) !== false) {
                    $k2 = key($v);
                    $ob2 = clone $ob;
                    $ob2->level = $v2;
                    $out[$k2] = $ob2;

                    if (($last < $v2) && isset($levels[$v2])) {
                        $out[$levels[$v2]]->last = true;
                    }
                    $levels[$v2] = $k2;
                    $last = $v2;
                    next($v);
                }

                foreach ($levels as $v) {
                    $out[$v]->last = true;
                }

                return $out;
            }
        }

        return array();
    }
public function getThread ( $ index ) { foreach ( $ this -> _thread as $ v ) { if ( isset ( $ v [ $ index ] ) ) { reset ( $ v ) ; $ ob = new stdClass ; $ ob -> base = ( count ( $ v ) > 1 ) ? key ( $ v ) : null ; $ ob -> last = false ; $ levels = $ out = array ( ) ; $ last = 0 ; while ( ( $ v2 = current ( $ v ) ) !== false ) { $ k2 = key ( $ v ) ; $ ob2 = clone $ ob ; $ ob2 -> level = $ v2 ; $ out [ $ k2 ] = $ ob2 ; if ( ( $ last < $ v2 ) && isset ( $ levels [ $ v2 ] ) ) { $ out [ $ levels [ $ v2 ] ] -> last = true ; } $ levels [ $ v2 ] = $ k2 ; $ last = $ v2 ; next ( $ v ) ; } foreach ( $ levels as $ v ) { $ out [ $ v ] -> last = true ; } return $ out ; } } return array ( ) ; }
Returns the list of messages in a thread.

@param integer $index  An index contained in the thread.

@return array  Keys are indices, values are objects with the following
properties:
- base: (integer) Base ID of the thread. If null, thread is a single
message.
- last: (boolean) If true, this is the last index in the sublevel.
- level: (integer) The sublevel of the index.
Returns the list of messages in a thread .