public function translateFilename($format, Base $object, $vars = array(), $check = true)
    {
        if ($object && ($filename = $object->translateVars(null !== $format ? $format : $this->getConfig()->get(FormatterInterface::CFG_FILENAME), $vars)))
        {
            if ($check && false !== strpos($filename, '%')) {
                throw new \Exception(sprintf('All filename variable where not converted. Perhaps a misstyped name (%s) ?', substr($filename, strpos($filename, '%'), strrpos($filename, '%'))));
            }

            return $filename;
        }
    }