for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Kir\MySQL\Builder\Traits;
trait OffsetBuilder {
/** @var int */
private $offset = null;
/**
* @return int
*/
protected function getOffset() {
return $this->offset;
}
* @param int $offset
* @return $this
public function offset($offset) {
$this->offset = $offset;
return $this;
* @param string $query
* @return string
protected function buildOffset($query) {
if($this->offset !== null) {
$query .= "OFFSET\n\t{$this->offset}\n";
return $query;