private function getDefinitionDir($type, array $driverConfig, ContainerBuilder $container)
    {
        $defaultDir = sprintf('%s/Resources/As3ModlrBundle', $container->getParameter('kernel.root_dir'));

        $folder = sprintf('%ss', $type);
        $key = sprintf('%s_dir', $type);

        return isset($driverConfig['parameters'][$key])
            ? Utility::locateResource($driverConfig['parameters'][$key], $container)
            : sprintf('%s/%s', $defaultDir, $folder)
        ;
    }