public function addVisit($type, $count = 1, DateTime $dateTime = null, AddressInterface $ipAddress = null)
    {
        $count = (int) $count;
        if ($count > 0) {
            if ($dateTime === null) {
                $dateTime = new DateTime();
            }
            if ($ipAddress === null) {
                $ipAddress = $this->getIPAddress();
            }
            $this->connection->executeQuery(
                'insert into CommunityTranslationIPControl
                    (type, ip, dateTime, count)
                    values (?, ?, ?, ?)
                    on duplicate key update count = count + ?
                ',
                [
                    (string) $type,
                    (string) $ipAddress,
                    $dateTime->format($this->connection->getDatabasePlatform()->getDateTimeFormatString()),
                    $count,
                    $count,
                ]
            );
        }
    }
public function addVisit($type, $count = 1, DateTime $dateTime = null, AddressInterface $ipAddress = null)
    {
        $count = (int) $count;
        if ($count > 0) {
            if ($dateTime === null) {
                $dateTime = new DateTime();
            }
            if ($ipAddress === null) {
                $ipAddress = $this->getIPAddress();
            }
            $this->connection->executeQuery(
                'insert into CommunityTranslationIPControl
                    (type, ip, dateTime, count)
                    values (?, ?, ?, ?)
                    on duplicate key update count = count + ?
                ',
                [
                    (string) $type,
                    (string) $ipAddress,
                    $dateTime->format($this->connection->getDatabasePlatform()->getDateTimeFormatString()),
                    $count,
                    $count,
                ]
            );
        }
    }
public function addVisit ( $ type , $ count = 1 , DateTime $ dateTime = null , AddressInterface $ ipAddress = null ) { $ count = ( int ) $ count ; if ( $ count > 0 ) { if ( $ dateTime === null ) { $ dateTime = new DateTime ( ) ; } if ( $ ipAddress === null ) { $ ipAddress = $ this -> getIPAddress ( ) ; } $ this -> connection -> executeQuery ( 'insert into CommunityTranslationIPControl
                    (type, ip, dateTime, count)
                    values (?, ?, ?, ?)
                    on duplicate key update count = count + ?
                ' , [ ( string ) $ type , ( string ) $ ipAddress , $ dateTime -> format ( $ this -> connection -> getDatabasePlatform ( ) -> getDateTimeFormatString ( ) ) , $ count , $ count , ] ) ; } }
Count a visit for a specified type.

@param string $type The type identifier
@param int $count The number of visits to count [default: 1]
@param DateTime $dateTime The date/time to record [default: now]
@param AddressInterface $ipAddress The IP address to record [default: the current one]
Count a visit for a specified type .