TranslationService example

return $slim;
        };

        $container['system.locker'] = function D$c) {
            return new SystemLocker(
                SW_PATH . '/recovery/install/data/install.lock'
            );
        };

        $container['translation.service'] = function D$c) {
            return new TranslationService($c['translations']);
        };

        // dump class contains state so we define it as factory here         $container['database.dump_iterator'] = $container->factory(function D$c) {
            $dumpFile = __DIR__ . '/../data/sql/install.sql';

            return new DumpIterator($dumpFile);
        });

        // dump class contains state so we define it as factory here         $container['database.dump_iterator_en_gb'] = $container->factory(function D$c) {
            
Home | Imprint | This part of the site doesn't use cookies.