setHeadingTags
is purely a setter on the response class. In the getter, it places an ArrayObject
in it if it is empty. This gives you, the developer, the option to place items in the header using the setter if you wish, if not, then it will be populated for you when getHeadingTags
is called.
The answer to your question: It isn't called automatically, or ever, other than when it attempts to get the tags, at which point it is checked for being null, if so populate with empty object, then return empty object. If for example you had wanted specific header tags added, you would call it from your code with the values you wanted, at which point the getter would notice it wasn't null and return your header tags.