You are here

protected function IteratingServiceBaseTrait::reloadIterator in Purge 8.3

Rewind the iterator and destruct loaded plugin instances.

@warning Reloading a service implies that all cached data will be reset and that plugins get reinstantiated during the current request, which should normally not be used. This method is specifically used in tests.

See also

\Drupal\purge\ServiceInterface::reload()

4 calls to IteratingServiceBaseTrait::reloadIterator()
DiagnosticsService::reload in src/Plugin/Purge/DiagnosticCheck/DiagnosticsService.php
Reload the service and reinstantiate all enabled plugins.
ProcessorsService::reload in src/Plugin/Purge/Processor/ProcessorsService.php
Reload the service and reinstantiate all enabled plugins.
QueuersService::reload in src/Plugin/Purge/Queuer/QueuersService.php
Reload the service and reinstantiate all enabled plugins.
TagsHeadersService::reload in src/Plugin/Purge/TagsHeader/TagsHeadersService.php
Reload the service and reinstantiate all enabled plugins.

File

src/IteratingServiceBaseTrait.php, line 82

Class

IteratingServiceBaseTrait
Adds \Iterator logic to \Drupal\purge\ServiceInterface derivatives.

Namespace

Drupal\purge

Code

protected function reloadIterator() {
  $this->instances = NULL;
  $this
    ->rewind();
}