MediaWiki master
TrivialMediaHandlerState.php
Go to the documentation of this file.
1<?php
2
3namespace MediaWiki\Media;
4
12 private $state = [];
13
15 public function getHandlerState( string $key ) {
16 return $this->state[$key] ?? null;
17 }
18
20 public function setHandlerState( string $key, $value ) {
21 $this->state[$key] = $value;
22 }
23}
24
26class_alias( TrivialMediaHandlerState::class, 'TrivialMediaHandlerState' );
Trivial implementation of MediaHandlerState.
getHandlerState(string $key)
Get a value, or null if it does not exist.mixed|null
setHandlerState(string $key, $value)
Set a value.
An interface to support process-local caching of handler data associated with a given file.