You are here

public function RateLimit::hit in RESTful 7.2

Saves an extra hit.

File

src/RateLimit/Entity/RateLimit.php, line 29
Contains Drupal\restful\RateLimit\Entity\RateLimit.

Class

RateLimit

Namespace

Drupal\restful\RateLimit\Entity

Code

public function hit() {
  $this->hits++;
  $this
    ->save();
}