public static function invert($object)
    {
        if (!is_array($object))
            $castDown = (boolean)$object = static::toArray($object);

        return !empty($castDown) ? (object)array_flip($object) : array_flip($object);
    }