protected function getCountSection()
    {
        $this->getRecursiveSections($this->structure);
        $sections = array();
        if (!isset($this->section)) {
            $this->section[0] = array(0);
        }
        foreach ($this->section as $array) {
            foreach ($array as $section) {
                $sections[] = $section;
            }
        }
        $sections = array_unique($sections);
        sort($sections);
        $this->section = $sections;

        return $this->section;
    }
protected function getCountSection()
    {
        $this->getRecursiveSections($this->structure);
        $sections = array();
        if (!isset($this->section)) {
            $this->section[0] = array(0);
        }
        foreach ($this->section as $array) {
            foreach ($array as $section) {
                $sections[] = $section;
            }
        }
        $sections = array_unique($sections);
        sort($sections);
        $this->section = $sections;

        return $this->section;
    }
protected function getCountSection ( ) { $ this -> getRecursiveSections ( $ this -> structure ) ; $ sections = array ( ) ; if ( ! isset ( $ this -> section ) ) { $ this -> section [ 0 ] = array ( 0 ) ; } foreach ( $ this -> section as $ array ) { foreach ( $ array as $ section ) { $ sections [ ] = $ section ; } } $ sections = array_unique ( $ sections ) ; sort ( $ sections ) ; $ this -> section = $ sections ; return $ this -> section ; }
Get count section.

We take $this->section and make a simple array from an array of arrays.
If getRecursiveSections($this->structure) set $this->section to NULL,
then we think that there is only one section in the letter.
We install $this->section[0] = [0],
and then we will take this into account in subsequent processing.
Namely here getSection() and $this->getSectionStructure()
or getSectionStructureFromIncomingStructure().
Because if the message id is correct and the structure is returned,
then there is exactly one section in the message.

@return array sections
Get count section .