structure_files/SectionFile/SectionFile.php
public function getIndexByName($name)
    {
        foreach ($this->sections as $i => $sec) {
            if ($sec instanceof Section) {
                if ($sec->getName() == $name) {
                    return $i;
                }
            }
        }
        return -1;
    }
public function getIndexByName($name)
    {
        foreach ($this->sections as $i => $sec) {
            if ($sec instanceof Section) {
                if ($sec->getName() == $name) {
                    return $i;
                }
            }
        }
        return -1;
    }
public function getIndexByName ( $ name ) { foreach ( $ this -> sections as $ i => $ sec ) { if ( $ sec instanceof Section ) { if ( $ sec -> getName ( ) == $ name ) { return $ i ; } } } return - 1 ; }
Get section index by section name, -1 for not exists.

@param string $name
@return int
Get section index by section name - 1 for not exists .