Prado\Util\TDbLogRoute::init PHP Метод

init() публичный Метод

This method is required by the IModule interface. It initializes the database for logging purpose.
public init ( $config )
    public function init($config)
    {
        $db = $this->getDbConnection();
        $db->setActive(true);
        $sql = 'SELECT * FROM ' . $this->_logTable . ' WHERE 0=1';
        try {
            $db->createCommand($sql)->query()->close();
        } catch (Exception $e) {
            // DB table not exists
            if ($this->_autoCreate) {
                $this->createDbTable();
            } else {
                throw new TConfigurationException('db_logtable_inexistent', $this->_logTable);
            }
        }
        parent::init($config);
    }