Skip to content

Instantly share code, notes, and snippets.

@fprochazka
Last active Aug 29, 2015
Embed
What would you like to do?
<?php
require __DIR__ . '/../vendor/autoload.php';
$configurator = new Nette\Configurator;
$configurator->setDebugMode(TRUE); // debug mode MUST NOT be enabled on production server
$configurator->enableDebugger(__DIR__ . '/../log');
$configurator->setTempDirectory(__DIR__ . '/../temp');
$configurator->createRobotLoader()
->addDirectory(__DIR__)
->addDirectory(__DIR__ . '/../vendor/others')
->register();
$configurator->addConfig(__DIR__ . '/config/config.neon');
$configurator->addConfig(__DIR__ . '/config/config.local.neon');
$container = $configurator->createContainer();
$models = $container->getService("models");
MultipleFileUpload\MultipleFileUpload::register();
MultipleFileUpload\MultipleFileUpload::getUIRegistrator()
->clear()
->register('MultipleFileUpload\UI\HTML4SingleUpload')
->register('MultipleFileUpload\UI\Uploadify');
MultipleFileUpload\MultipleFileUpload::setQueuesModel(new MultipleFileUpload\Model\MySQL\Queues($models->getConnection()));
return $container;
parameters:
nette:
database:
dsn: 'mysql:host=127.0.0.1;dbname=cmsz1'
user: root
password:
options:
lazy: yes
#
# SECURITY WARNING: it is CRITICAL that this file & directory are NOT accessible directly via a web browser!
#
# If you don't protect this directory from direct web access, anybody will be able to see your passwords.
# http://nette.org/security-warning
#
parameters:
php:
date.timezone: Europe/Prague
# zlib.output_compression: yes
nette:
application:
errorPresenter: Error
mapping:
*: App\*Module\Presenters\*Presenter
session:
expiration: 14 days
services:
- App\Model\Core\UserManager
- App\RouterFactory
router: @App\RouterFactory::createRouter
- App\Model\Core\PageStats()
- App\Model\Core\LogAgent()
- App\Model\Core\DbReader()
- App\Model\Core\Settings()
- App\Model\Content\User\UserRepository()
- App\Model\Content\User\UserEntity()
- App\Model\Content\User\ProfileEntity()
- App\Model\Content\User\BlockedEntity()
- App\Model\Content\Article\ArticleRepository()
- App\Model\Content\Article\ArticleEntity()
- App\Model\Content\Category\CategoryRepository()
- App\Model\Content\Category\CategoryEntity()
- App\Model\Content\Group\GroupRepository()
- App\Model\Content\Group\GroupEntity()
- App\Moel\Content\Media\MediaRepository()
- App\Moel\Content\Media\MediaEntity()
- App\Moel\Content\Page\PageRepository()
- App\Moel\Content\Page\PageEntity()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment