src/Graviton/GeneratorBundle/Command/GenerateDynamicBundleCommand.php
private function getTemplateHash()
    {
        $templateDir = __DIR__ . '/../Resources/skeleton';
        $resourceFinder = new Finder();
        $resourceFinder->in($templateDir)->files()->sortByName();
        $templateTimes = '';
        foreach ($resourceFinder as $file) {
            $templateTimes .= PATH_SEPARATOR . sha1_file($file->getPathname());
        }
        return sha1($templateTimes);
    }
private function getTemplateHash()
    {
        $templateDir = __DIR__ . '/../Resources/skeleton';
        $resourceFinder = new Finder();
        $resourceFinder->in($templateDir)->files()->sortByName();
        $templateTimes = '';
        foreach ($resourceFinder as $file) {
            $templateTimes .= PATH_SEPARATOR . sha1_file($file->getPathname());
        }
        return sha1($templateTimes);
    }
private function getTemplateHash ( ) { $ templateDir = __DIR__ . '/../Resources/skeleton' ; $ resourceFinder = new Finder ( ) ; $ resourceFinder -> in ( $ templateDir ) -> files ( ) -> sortByName ( ) ; $ templateTimes = '' ; foreach ( $ resourceFinder as $ file ) { $ templateTimes .= PATH_SEPARATOR . sha1_file ( $ file -> getPathname ( ) ) ; } return sha1 ( $ templateTimes ) ; }
Calculates a hash of all templates that generator uses to output it's file.
That way a regeneration will be triggered when one of them changes..

@return string hash
Calculates a hash of all templates that generator uses to output it s file . That way a regeneration will be triggered when one of them changes ..