protected function sortObject($object)
    {
        $sort_array = get_object_vars($object);
        ksort($sort_array);

        $new_object = new stdClass();
        foreach ($sort_array as $key => $value) {
            if (is_object($value)) {
                $value = $this->sortObject($value);
            }
            $new_object->$key = $value;
        }

        unset($sort_array);
        unset($object);

        return $new_object;
    }
protected function sortObject($object)
    {
        $sort_array = get_object_vars($object);
        ksort($sort_array);

        $new_object = new stdClass();
        foreach ($sort_array as $key => $value) {
            if (is_object($value)) {
                $value = $this->sortObject($value);
            }
            $new_object->$key = $value;
        }

        unset($sort_array);
        unset($object);

        return $new_object;
    }
protected function sortObject ( $ object ) { $ sort_array = get_object_vars ( $ object ) ; ksort ( $ sort_array ) ; $ new_object = new stdClass ( ) ; foreach ( $ sort_array as $ key => $ value ) { if ( is_object ( $ value ) ) { $ value = $ this -> sortObject ( $ value ) ; } $ new_object -> $ key = $ value ; } unset ( $ sort_array ) ; unset ( $ object ) ; return $ new_object ; }
Sort an object

@param   object $object

@return  object
@since   1.0.0
Sort an object