Plugin::initDb PHP Method

initDb() public method

データベースを初期化する 既存のテーブルは上書きしない
public initDb ( string $pluginName = '', $options = [] ) : boolean
$pluginName string プラグイン名
return boolean
    public function initDb($pluginName = '', $options = array())
    {
        if (!is_array($options)) {
            // @deprecated 5.0.0 since 4.0.0 baserCMS3まで第二引数がプラグイン名だったが、第一引数にプラグイン名を設定するように変更。元の第一引数は不要
            $this->log('メソッド:Plugin::initDb()は、バージョン 4.0.0 より引数が変更になりました。第一引数にプラグイン名を設定してください。元の第一引数は不要です。', LOG_ALERT);
            $pluginName = $options;
            $options = [];
        }
        $options = array_merge(array('loadCsv' => true, 'filterTable' => '', 'filterType' => 'create', 'dbDataPattern' => ''), $options);
        return parent::initDb($pluginName, array('loadCsv' => $options['loadCsv'], 'filterTable' => $options['filterTable'], 'filterType' => $options['filterType'], 'dbDataPattern' => $options['dbDataPattern']));
    }