protected function getRecursiveSections($obj, $before = null)
    {
        if (!isset($obj->parts)) {
            return;
        }
        $countParts = count($obj->parts);
        $out = array();
        $beforeSave = $before;
        foreach ($obj->parts as $key => $subObj) {
            if (!isset($beforeSave)) {
                $before = ($key + 1);
            } else {
                $before = $beforeSave.'.'.($key + 1);
            }
            $this->getRecursiveSections($subObj, $before);
            $out[] = (string) $before;
        }
        $this->section[] = $out;
    }
protected function getRecursiveSections($obj, $before = null)
    {
        if (!isset($obj->parts)) {
            return;
        }
        $countParts = count($obj->parts);
        $out = array();
        $beforeSave = $before;
        foreach ($obj->parts as $key => $subObj) {
            if (!isset($beforeSave)) {
                $before = ($key + 1);
            } else {
                $before = $beforeSave.'.'.($key + 1);
            }
            $this->getRecursiveSections($subObj, $before);
            $out[] = (string) $before;
        }
        $this->section[] = $out;
    }
protected function getRecursiveSections ( $ obj , $ before = null ) { if ( ! isset ( $ obj -> parts ) ) { return ; } $ countParts = count ( $ obj -> parts ) ; $ out = array ( ) ; $ beforeSave = $ before ; foreach ( $ obj -> parts as $ key => $ subObj ) { if ( ! isset ( $ beforeSave ) ) { $ before = ( $ key + 1 ) ; } else { $ before = $ beforeSave . '.' . ( $ key + 1 ) ; } $ this -> getRecursiveSections ( $ subObj , $ before ) ; $ out [ ] = ( string ) $ before ; } $ this -> section [ ] = $ out ; }
Bypasses the recursive parts current message.

Counts sections based on $obj->parts.
And sets $this->section as an array of arrays or null.
Null if $obj->parts is not.

@param object $obj
@param string $before

@return void
Bypasses the recursive parts current message .