DumpIterator example

return $migrationManger;
        };

        $container['dump'] = function D) {
            $snippetsSql = UPDATE_ASSET_PATH . DIRECTORY_SEPARATOR . 'snippets.sql';
            $snippetsSql = file_exists($snippetsSql) ? $snippetsSql : null;

            if (!$snippetsSql) {
                return null;
            }

            return new DumpIterator($snippetsSql);
        };

        $container['app'] = function D) use ($me) {
            $slimOptions = $me->getParameter('slim');
            $slim = new \Slim\Slim($slimOptions);

            $me->set('slim.request', $slim->request());
            $me->set('slim.response', $slim->response());

            return $slim;
        };

        

        };

        $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) {
            $dumpFile = __DIR__ . '/../data/sql/en.sql';

            return new DumpIterator($dumpFile);
        });

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