MediaWiki REL1_34
|
SalvageableService defines an interface for services that are able to salvage state from a previous instance of the same class. More...
Public Member Functions | |
salvage (SalvageableService $other) | |
Re-uses state from $other. | |
SalvageableService defines an interface for services that are able to salvage state from a previous instance of the same class.
The intent is to allow new service instances to re-use resources that would be expensive to re-create, such as cached data or network connections.
Definition at line 36 of file SalvageableService.php.
Wikimedia\Services\SalvageableService::salvage | ( | SalvageableService | $other | ) |
Re-uses state from $other.
$other must not be used after being passed to salvage(), and should be considered to be destroyed.
SalvageableService | $other | The object to salvage state from. $other must have the exact same type as $this. |
Implemented in ConfigFactory, and MediaWiki\Config\ConfigRepository.