mirror of
https://github.com/wallabag/wallabag.git
synced 2024-06-02 06:01:12 +00:00
2297d60f10
In case user wants a fresh version of the current one and the website isn’t available, don’t erase it with a boring message saying wallabag wasn’t able to refresh the content.
38 lines
1.6 KiB
PHP
38 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Wallabag\CoreBundle\DependencyInjection;
|
|
|
|
use Symfony\Component\Config\FileLocator;
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
use Symfony\Component\DependencyInjection\Loader;
|
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
|
|
|
class WallabagCoreExtension extends Extension
|
|
{
|
|
public function load(array $configs, ContainerBuilder $container)
|
|
{
|
|
$configuration = new Configuration();
|
|
$config = $this->processConfiguration($configuration, $configs);
|
|
|
|
$container->setParameter('wallabag_core.languages', $config['languages']);
|
|
$container->setParameter('wallabag_core.items_on_page', $config['items_on_page']);
|
|
$container->setParameter('wallabag_core.theme', $config['theme']);
|
|
$container->setParameter('wallabag_core.language', $config['language']);
|
|
$container->setParameter('wallabag_core.rss_limit', $config['rss_limit']);
|
|
$container->setParameter('wallabag_core.reading_speed', $config['reading_speed']);
|
|
$container->setParameter('wallabag_core.version', $config['version']);
|
|
$container->setParameter('wallabag_core.paypal_url', $config['paypal_url']);
|
|
$container->setParameter('wallabag_core.cache_lifetime', $config['cache_lifetime']);
|
|
$container->setParameter('wallabag_core.fetching_error_message', $config['fetching_error_message']);
|
|
|
|
$loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
|
|
$loader->load('services.yml');
|
|
$loader->load('parameters.yml');
|
|
}
|
|
|
|
public function getAlias()
|
|
{
|
|
return 'wallabag_core';
|
|
}
|
|
}
|