public static function getUniqueFileName($originalFileName, $objectId = 0)
    {
        $withoutExtension = self::getFileNameWithoutExtension($originalFileName);
        $extension = self::getFileExtension($originalFileName, true);

        /*
         * Let's clear name of file
         *
         * Attention.
         * The name without extension may be cleared / urlized only to avoid incorrect name by replacing "." with "-".
         */
        $withoutExtension = Urlizer::urlize($withoutExtension);

        // Now I have to complete the template used to build / generate unique name
        $template = '%s-%s.%s'; // [file's name]-[unique key].[file's extension]

        // Add some uniqueness
        $unique = self::getUniqueString(mt_rand());

        // Finally build and return the unique name
        if ($objectId > 0) {
            $template = '%s-%s-%s.%s'; // [file's name]-[unique key]-[object ID].[file's extension]

            return sprintf($template, $withoutExtension, $unique, $objectId, $extension);
        }

        return sprintf($template, $withoutExtension, $unique, $extension);
    }