public function setTable($table)
    {
        if ($table === null) {
            $this->table = $table;
            return $this;
        }

        if (!is_string($table)) {
            throw new InvalidArgumentException(
                'Table reference must be a string.'
            );
        }

        if ($table === '') {
            throw new InvalidArgumentException(
                'Table reference can not be empty.'
            );
        }

        $this->table = $table;
        return $this;
    }