Bolt\Configuration\ResourceManager::getVerifier PHP Method

getVerifier() public method

Get the LowlevelChecks object.
public getVerifier ( ) : Bolt\Configuration\Validation\ValidatorInterface
return Bolt\Configuration\Validation\ValidatorInterface
    public function getVerifier()
    {
        if (!$this->verifier) {
            $verifier = new LowlevelChecks($this);
            $this->verifier = $verifier;
        }
        return $this->verifier;
    }

Usage Example

Example #1
0
 /**
  * This check looks for the presence of the .htaccess file inside the web directory.
  * It is here only as a convenience check for users that install the basic version of Bolt.
  *
  * If you see this error and want to disable it, call $config->getVerifier()->disableApacheChecks();
  * inside your bootstrap.php file, just before the call to $config->verify().
  *
  * {@inheritdoc}
  */
 public function check(ExceptionControllerInterface $exceptionController)
 {
     $request = Request::createFromGlobals();
     $serverSoftware = $request->server->get('SERVER_SOFTWARE', '');
     $isApache = strpos($serverSoftware, 'Apache') !== false;
     if ($this->resourceManager->getVerifier()->disableApacheChecks === true || !$isApache) {
         return null;
     }
     $path = $this->resourceManager->getPath('web/.htaccess');
     if (is_readable($path)) {
         return null;
     }
     return $exceptionController->systemCheck(Validator::CHECK_APACHE);
 }