// Fix up the ugly "even numbered elements are description, odd
// numbered elemts are the link" format (see doc for self::getExamples)
$tmp = array();
- for ( $i = 0; $i < count( $examples ); $i += 2 ) {
+ $examplesCount = count( $examples );
+ for ( $i = 0; $i < $examplesCount; $i += 2 ) {
$tmp[$examples[$i + 1]] = $examples[$i];
}
$examples = $tmp;
return null;
}
+ /**
+ * Returns data for HTTP conditional request mechanisms.
+ *
+ * @since 1.26
+ * @param string $condition Condition being queried:
+ * - last-modified: Return a timestamp representing the maximum of the
+ * last-modified dates for all resources involved in the request. See
+ * RFC 7232 § 2.2 for semantics.
+ * - etag: Return an entity-tag representing the state of all resources involved
+ * in the request. Quotes must be included. See RFC 7232 § 2.3 for semantics.
+ * @return string|boolean|null As described above, or null if no value is available.
+ */
+ public function getConditionalRequestData( $condition ) {
+ return null;
+ }
+
/**@}*/
/************************************************************************//**
$desc = implode( $paramPrefix, $desc );
}
- //handle shorthand
+ // handle shorthand
if ( !is_array( $paramSettings ) ) {
$paramSettings = array(
self::PARAM_DFLT => $paramSettings,
);
}
- //handle missing type
+ // handle missing type
if ( !isset( $paramSettings[ApiBase::PARAM_TYPE] ) ) {
$dflt = isset( $paramSettings[ApiBase::PARAM_DFLT] )
? $paramSettings[ApiBase::PARAM_DFLT]