You are here

interface DiagnosticsServiceInterface in Purge 8.3

Describes a service that interacts with diagnostic checks.

Hierarchy

Expanded class hierarchy of DiagnosticsServiceInterface

All classes that implement DiagnosticsServiceInterface

3 files declare their use of DiagnosticsServiceInterface
DashboardController.php in modules/purge_ui/src/Controller/DashboardController.php
DiagnosticsCommand.php in modules/purge_drush/src/Commands/DiagnosticsCommand.php
PurgersService.php in src/Plugin/Purge/Purger/PurgersService.php

File

src/Plugin/Purge/DiagnosticCheck/DiagnosticsServiceInterface.php, line 11

Namespace

Drupal\purge\Plugin\Purge\DiagnosticCheck
View source
interface DiagnosticsServiceInterface extends ServiceInterface, ContainerAwareInterface, \Iterator, \Countable {

  /**
   * Get only SEVERITY_INFO level checks.
   *
   * @return \Iterator[]
   *   \Iterator object that yields DiagnosticCheckInterface instances.
   */
  public function filterInfo();

  /**
   * Get only SEVERITY_OK level checks.
   *
   * @return \Iterator[]
   *   \Iterator object that yields DiagnosticCheckInterface instances.
   */
  public function filterOk();

  /**
   * Get only SEVERITY_WARNING level checks.
   *
   * @return \Iterator[]
   *   \Iterator object that yields DiagnosticCheckInterface instances.
   */
  public function filterWarnings();

  /**
   * Get only SEVERITY_WARNING and SEVERITY_ERROR level checks.
   *
   * @return \Iterator[]
   *   \Iterator object that yields DiagnosticCheckInterface instances.
   */
  public function filterWarningAndErrors();

  /**
   * Get only SEVERITY_ERROR level checks.
   *
   * @return \Iterator[]
   *   \Iterator object that yields DiagnosticCheckInterface instances.
   */
  public function filterErrors();

  /**
   * Reports if any of the diagnostic checks report a SEVERITY_ERROR severity.
   *
   * This method provides a simple - boolean evaluable - way to determine if
   * a DiagnosticCheckInterface::SEVERITY_ERROR severity was reported by one of
   * the checks. If SEVERITY_ERROR was reported, purging cannot continue and
   * should happen once all problems are resolved.
   *
   * @return false|\Drupal\purge\Plugin\Purge\DiagnosticCheck\DiagnosticCheckInterface
   *   The SEVERITY_ERROR reporting check, or FALSE when everything was fine.
   */
  public function isSystemOnFire();

  /**
   * Reports if any of the diagnostic checks report a SEVERITY_WARNING severity.
   *
   * This method provides a - boolean evaluable - way to determine if a check
   * reported a DiagnosticCheckInterface::SEVERITY_WARNING. If SEVERITY_WARNING
   * was reported, cache invalidation can continue but it is important that the
   * site administrator gets notified.
   *
   * @return false|\Drupal\purge\Plugin\Purge\DiagnosticCheck\DiagnosticCheckInterface
   *   The SEVERITY_WARNING reporting check, or FALSE when everything was fine.
   */
  public function isSystemShowingSmoke();

  /**
   * Generate a status_messages #message_list argument array.
   *
   * @param \Iterator $checks
   *   Iterator yielding DiagnosticCheckInterface objects.
   *
   * @return array[]
   *   Array with typed arrays, in each typed array are messages.
   */
  public function toMessageList(\Iterator $checks);

  /**
   * Generate a Drupal-like requirements array.
   *
   * @param \Iterator $checks
   *   Iterator yielding DiagnosticCheckInterface objects.
   * @param bool $prefix_title
   *   When TRUE, this prefixes titles with "Purge" to mark their origin.
   *
   * @return array[]
   *   Array with Drupal-like requirement arrays as values.
   */
  public function toRequirementsArray(\Iterator $checks, $prefix_title = FALSE);

}

Members

Namesort descending Modifiers Type Description Overrides
DiagnosticsServiceInterface::filterErrors public function Get only SEVERITY_ERROR level checks. 1
DiagnosticsServiceInterface::filterInfo public function Get only SEVERITY_INFO level checks. 1
DiagnosticsServiceInterface::filterOk public function Get only SEVERITY_OK level checks. 1
DiagnosticsServiceInterface::filterWarningAndErrors public function Get only SEVERITY_WARNING and SEVERITY_ERROR level checks. 1
DiagnosticsServiceInterface::filterWarnings public function Get only SEVERITY_WARNING level checks. 1
DiagnosticsServiceInterface::isSystemOnFire public function Reports if any of the diagnostic checks report a SEVERITY_ERROR severity. 1
DiagnosticsServiceInterface::isSystemShowingSmoke public function Reports if any of the diagnostic checks report a SEVERITY_WARNING severity. 1
DiagnosticsServiceInterface::toMessageList public function Generate a status_messages #message_list argument array. 1
DiagnosticsServiceInterface::toRequirementsArray public function Generate a Drupal-like requirements array. 1
ServiceInterface::getPlugins public function Retrieve a list of all available plugins providing the service. 1
ServiceInterface::getPluginsEnabled public function Retrieve the configured plugin_ids that the service will use. 1
ServiceInterface::isPluginEnabled public function Find out whether the given plugin_id is enabled. 1
ServiceInterface::reload public function Reload the service and reinstantiate all enabled plugins. 1
ServiceModifierInterface::alter public function Modifies existing service definitions. 13
ServiceProviderInterface::register public function Registers services to the container. 14