protected function getCountCommonParseSort($mSort)
    {
        $aOut = ['column' => null, 'order' => null];

        // --------------------------------------------------------------------------

        if (is_string($mSort)) {

            $aOut['column'] = $mSort;
            return $aOut;

        } elseif (isset($mSort['column'])) {

            $aOut['column'] = $mSort['column'];

        } else {

            //  Take the first element
            $aOut['column'] = reset($mSort);
            $aOut['column'] = is_string($aOut['column']) ? $aOut['column'] : null;
        }

        if ($aOut['column']) {

            //  Determine order
            if (isset($mSort['order'])) {

                $aOut['order'] = $mSort['order'];

            } elseif (count($mSort) > 1) {

                //  Take the last element
                $aOut['order'] = end($mSort);
                $aOut['order'] = is_string($aOut['order']) ? $aOut['order'] : null;
            }
        }

        return $aOut;
    }