*
* @file
* @ingroup ExternalStorage
- * @author Aaron Schulz
*/
/**
*/
abstract class ExternalStoreMedium {
/** @var array */
- protected $params = array();
+ protected $params = [];
/**
- * @param array $params Options
+ * @param array $params Usage context options:
+ * - wiki: the domain ID of the wiki this is being used for [optional]
*/
- public function __construct( array $params = array() ) {
+ public function __construct( array $params = [] ) {
$this->params = $params;
}
* @return array Map from the url to the text stored. Unfound data is not represented
*/
public function batchFetchFromURLs( array $urls ) {
- $retval = array();
+ $retval = [];
foreach ( $urls as $url ) {
$data = $this->fetchFromURL( $url );
// Dont return when false to allow for simpler implementations.
* @throws MWException
*/
abstract public function store( $location, $data );
+
+ /**
+ * Check if a given location is read-only
+ *
+ * @param string $location The location name
+ * @return bool Whether this location is read-only
+ * @since 1.31
+ */
+ public function isReadOnly( $location ) {
+ return false;
+ }
}