protected function checkTransaction() {
        if(null !== $this->con && !$this->con->inTransaction()) {
            $this->con->beginTransaction();
        }
        if(null !== $this->con && $this->con->inTransaction()) {
            $this->items++;
        }
        if($this->items >= Config::getParam('api.block.limit', 1000)) {
            $this->con->commit();
            $this->items = 0;
        }
    }