src/libraries/adapters/DatabaseSimpleDb.php
/**
    * Gets diagnostic information for debugging.
    *
    * @return array
    */
Gets diagnostic information for debugging.
@return array
Gets diagnostic information for debugging . @return array
public function diagnostics()
  {
    $diagnostics = array();
    $utilityObj = new Utility;
    $domains = array('', 'Action', 'Credential', 'Group', 'User', 'Tag', 'Webhook');
    $queue = $this->getBatchRequest();
    foreach($domains as $domain)
      $this->db->batch($queue)->domain_metadata("{$this->domainPhoto}{$domain}");
    $responses = $this->db->batch($queue)->send();
    if($responses->areOK())
    {
      $diagnostics[] = $utilityObj->diagnosticLine(true, 'All SimpleDb domains are accessible.');
    }
    else
    {
      foreach($responses as $key => $res)
      {
        if((int)$res->status !== 200)
          $diagnostics[] = $utilityObj->diagnosticLine(false, sprintf('The SimpleDb domains "%s" is NOT accessible.', $domains[$key]));
      }
    }
    return $diagnostics;
  }
public function diagnostics ( ) { $ diagnostics = array ( ) ; $ utilityObj = new Utility ; $ domains = array ( '' , 'Action' , 'Credential' , 'Group' , 'User' , 'Tag' , 'Webhook' ) ; $ queue = $ this -> getBatchRequest ( ) ; foreach ( $ domains as $ domain ) $ this -> db -> batch ( $ queue ) -> domain_metadata ( " { $ this -> domainPhoto } { $ domain } " ) ; $ responses = $ this -> db -> batch ( $ queue ) -> send ( ) ; if ( $ responses -> areOK ( ) ) { $ diagnostics [ ] = $ utilityObj -> diagnosticLine ( true , 'All SimpleDb domains are accessible.' ) ; } else { foreach ( $ responses as $ key => $ res ) { if ( ( int ) $ res -> status !== 200 ) $ diagnostics [ ] = $ utilityObj -> diagnosticLine ( false , sprintf ( 'The SimpleDb domains "%s" is NOT accessible.' , $ domains [ $ key ] ) ) ; } } return $ diagnostics ; }
Gets diagnostic information for debugging.
Gets diagnostic information for debugging .