* Subclasses may implement this to determine the necessary updates more
* efficiently, or make use of information about the old content.
*
+ * @note Implementations should call the SecondaryDataUpdates hook, like
+ * AbstractContent does.
+ *
* @param Title $title The context for determining the necessary updates
* @param Content $old An optional Content object representing the
* previous content, i.e. the content being replaced by this Content
*
* @since 1.21
*
- * @param string $sectionId The section's ID, given as a numeric string.
- * The ID "0" retrieves the section before the first heading, "1" the
- * text between the first heading (included) and the second heading
- * (excluded), etc.
+ * @param string|number $sectionId Section identifier as a number or string
+ * (e.g. 0, 1 or 'T-1'). The ID "0" retrieves the section before the first heading, "1" the
+ * text between the first heading (included) and the second heading (excluded), etc.
*
* @return Content|bool|null The section, or false if no such section
* exist, or null if sections are not supported.
*
* @since 1.21
*
- * @param mixed $section Null/false or a section number (0, 1, 2, T1, T2...), or "new"
+ * @param string|number|null|bool $sectionId Section identifier as a number or string
+ * (e.g. 0, 1 or 'T-1'), null/false or an empty string for the whole page
+ * or 'new' for a new section.
* @param Content $with New content of the section
* @param string $sectionTitle New section's subject, only if $section is 'new'
*
* @return string|null Complete article text, or null if error
*/
- public function replaceSection( $section, Content $with, $sectionTitle = '' );
+ public function replaceSection( $sectionId, Content $with, $sectionTitle = '' );
/**
* Returns a Content object with pre-save transformations applied (or this