Skip to content

Commit

Permalink
Метод addOffset($offset) в классе VkParams
Browse files Browse the repository at this point in the history
  • Loading branch information
StacoNiK committed Aug 6, 2016
1 parent 88197d1 commit 16e0ba4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/VKApi/VkParams.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,14 @@ public function existsParam($key)
{
return array_key_exists($key, $this->params);
}

public function addOffset($offset = 100)
{
$old_offset = 0;
$offset = (int) $offset;
if ($this->existsParam("offset")) {
$old_offset = (int) $this->get("offset");
}
return $this->set("offset", $old_offset + $offset);
}
}

0 comments on commit 16e0ba4

Please sign in to comment.