Added retrieval of sections

| Q             | A
| ------------- | ---
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #10145
| License       | MIT
There is phpdoc on the class attribute so return type can be figured out by any IDE if that is the point.