You are here

protected function KernelTerminateSubscriber::_getIpStr in Visitors 8.2

Converts a string containing an visitors (IPv4) Internet Protocol dotted address into a proper address.

Return value

string

1 call to KernelTerminateSubscriber::_getIpStr()
KernelTerminateSubscriber::onTerminate in src/EventSubscriber/KernelTerminateSubscriber.php
Store visitors data when a request terminates.

File

src/EventSubscriber/KernelTerminateSubscriber.php, line 145
Contains Drupal\visitors\EventSubscriber\KernelTerminateSubscriber.

Class

KernelTerminateSubscriber
Store visitors data when a request terminates.

Namespace

Drupal\visitors\EventSubscriber

Code

protected function _getIpStr() {
  return sprintf("%u", ip2long($this->request
    ->getClientIp()));
}