You are here

public function AcquiaPurgeDiagnostics::get in Acquia Purge 7

Get the test results.

Parameters

int $verbosity: (optional) Return test results matching the given level or higher.

Return value

array[] Array that complies to the format as seen in hook_requirements().

1 call to AcquiaPurgeDiagnostics::get()
AcquiaPurgeDiagnostics::isSystemBlocked in lib/AcquiaPurgeDiagnostics.php
Is the system blocked by an error? If so, retrieve the error.

File

lib/AcquiaPurgeDiagnostics.php, line 75
Contains AcquiaPurgeExecutorsService.

Class

AcquiaPurgeDiagnostics
Provides access to the diagnostic tests.

Code

public function get($verbosity = ACQUIA_PURGE_SEVLEVEL_INFO) {
  $this
    ->initializeTestResults();
  $results = array();
  foreach ($this->results as $id => $result) {
    if ($result['severity'] >= $verbosity) {
      $results[$id] = $result;
    }
  }
  return $results;
}