public function formatResults(callable $formatter = null, $mode = 0)
    {
        if ($mode === self::OVERWRITE) {
            $this->_formatters = [];
        }
        if ($formatter === null) {
            if ($mode !== self::OVERWRITE) {
                deprecationWarning(
                    'Using QueryTrait::formatResults() as a getter is deprecated. ' .
                    'Use getResultFormatters() instead.'
                );
            }

            return $this->_formatters;
        }

        if ($mode === self::PREPEND) {
            array_unshift($this->_formatters, $formatter);

            return $this;
        }

        $this->_formatters[] = $formatter;

        return $this;
    }