From: Brad Jorsch Date: Fri, 4 Sep 2015 16:59:20 +0000 (-0400) Subject: Document OutputPage::addVaryHeader() X-Git-Tag: 1.31.0-rc.0~10086^2 X-Git-Url: http://git.cyclocoop.org//%22%22._DIR_PLUGIN_FULLCALENDAR.%22prive/themes/spip/images/event_edit.png/%22?a=commitdiff_plain;h=242ca9556556f03dd8bd039c7acf4b359bf2e431;p=lhc%2Fweb%2Fwiklou.git Document OutputPage::addVaryHeader() The $options parameter to OutputPage::addVaryHeader() is undocumented as to what exactly is supposed to be passed to it. Fix that. Change-Id: I5fcbb8cf6219c6ab001962a4c2170e1733732426 --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 073762a035..338d1e148e 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2012,9 +2012,11 @@ class OutputPage extends ContextSource { * Add an HTTP header that will influence on the cache * * @param string $header Header name - * @param array|null $option - * @todo FIXME: Document the $option parameter; it appears to be for - * X-Vary-Options but what format is acceptable? + * @param string[]|null $option Options for X-Vary-Options. Possible options are: + * - "string-contains=$XXX" varies on whether the header value as a string + * contains $XXX as a substring. + * - "list-contains=$XXX" varies on whether the header value as a + * comma-separated list contains $XXX as one of the list items. */ public function addVaryHeader( $header, $option = null ) { if ( !array_key_exists( $header, $this->mVaryHeader ) ) {