Bolt\AccessControl\AccessChecker::getClientIp PHP Method

getClientIp() protected method

Return the user's IP address.
protected getClientIp ( ) : string
return string
    protected function getClientIp()
    {
        if ($this->requestStack->getCurrentRequest() === null) {
            throw new \RuntimeException(sprintf('%s can not be called outside of request cycle', __METHOD__));
        }
        return $this->requestStack->getCurrentRequest()->getClientIp() ?: '127.0.0.1';
    }