Madmatt\IPLists\Service\IPListService

Synopsis

class IPListService {
  • // constants
  • const IP_ACCESS_ALLOWED = 1;
  • const IP_ACCESS_DENIED = 0;
  • const IP_ACCESS_AMBIVALENT = 1;
}

Tasks

Line Task
56 Ideally we don't want to use the ORM here too much, as it results in uncachable queries

Constants

Name Value
IP_ACCESS_ALLOWED 1
IP_ACCESS_DENIED 0
IP_ACCESS_AMBIVALENT 1

Members

private

public

Methods

protected

public

  • canAccess() — Check all {@link IPList} objects to find any that match the given URL route. If one is found, confirm whether the current user's IP address is allowed to access the route or not.
  • canAccessWithList() — Reviews whether a given IPList would allow or deny access, or whether the list does not match the provided HTTPRequest.
  • getDenialResponse()