original_string: public static function checkRestrictedAccess($route)
      {
          Logger::log('Checking admin zone');
          //Chequeamos si entramos en el admin
          if (!Config::getInstance()->checkTryToSaveConfig()
              && (preg_match('/^\/(admin|setup\-admin)/i', $route) || Config::getParam('restricted', false))
          ) {
              if (!self::isTest() &&
                  null === Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json', Cache::JSONGZ, true)) {
                  throw new AdminCredentialsException();
              }
              if (!Security::getInstance()->checkAdmin()) {
                  throw new AccessDeniedException();
              }
              Logger::log('Admin access granted');
          }
      }
code: public static function checkRestrictedAccess($route)
      {
          Logger::log('Checking admin zone');
          //Chequeamos si entramos en el admin
          if (!Config::getInstance()->checkTryToSaveConfig()
              && (preg_match('/^\/(admin|setup\-admin)/i', $route) || Config::getParam('restricted', false))
          ) {
              if (!self::isTest() &&
                  null === Cache::getInstance()->getDataFromFile(CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json', Cache::JSONGZ, true)) {
                  throw new AdminCredentialsException();
              }
              if (!Security::getInstance()->checkAdmin()) {
                  throw new AccessDeniedException();
              }
              Logger::log('Admin access granted');
          }
      }
code_tokens: public static function checkRestrictedAccess ( $ route ) { Logger :: log ( 'Checking admin zone' ) ; //Chequeamos si entramos en el admin if ( ! Config :: getInstance ( ) -> checkTryToSaveConfig ( ) && ( preg_match ( '/^\/(admin|setup\-admin)/i' , $ route ) || Config :: getParam ( 'restricted' , false ) ) ) { if ( ! self :: isTest ( ) && null === Cache :: getInstance ( ) -> getDataFromFile ( CONFIG_DIR . DIRECTORY_SEPARATOR . 'admins.json' , Cache :: JSONGZ , true ) ) { throw new AdminCredentialsException ( ) ; } if ( ! Security :: getInstance ( ) -> checkAdmin ( ) ) { throw new AccessDeniedException ( ) ; } Logger :: log ( 'Admin access granted' ) ; } }
docstring: Method that checks the access to the restricted zone
  
  @param string $route
  
  @throws AccessDeniedException
  @throws AdminCredentialsException
docstring_tokens: Method that checks the access to the restricted zone