summaryrefslogtreecommitdiffstats
path: root/vendor/fguillot/picofeed/lib/PicoFeed/Base.php
blob: 4be0985e4bb7944c66d2f51daeb3aed9fb9e99a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php

namespace PicoFeed;

use PicoFeed\Config\Config;
use PicoFeed\Logging\Logger;

/**
 * Base class
 *
 * @package PicoFeed
 * @author  Frederic Guillot
 */
abstract class Base
{
    /**
     * Config class instance
     *
     * @access protected
     * @var \PicoFeed\Config\Config
     */
    protected $config;

    /**
     * Constructor.
     *
     * @param \PicoFeed\Config\Config   $config   Config class instance
     */
    public function __construct(Config $config = null)
    {
        $this->config = $config ?: new Config();
        Logger::setTimezone($this->config->getTimezone());
    }
}