public function sortKey($direction = SORT_ASC, $sortFlag = SORT_REGULAR)
    {
        try {
            $arr = $this->val();
            if ($direction == SORT_DESC) {
                krsort($arr, $sortFlag);
            } else {
                ksort($arr, $sortFlag);
            }
        } catch (\ErrorException $e) {
            throw new ArrayObjectException($e->getMessage());
        }

        $this->val($arr);

        return $this;
    }