Contao\Database\Installer::getFromFile PHP Méthode

getFromFile() public méthode

Get the DCA table settings from the database.sql files
public getFromFile ( ) : array
Résultat array An array of DCA table settings
    public function getFromFile()
    {
        $return = array();
        /** @var SplFileInfo[] $files */
        $files = \System::getContainer()->get('contao.resource_finder')->findIn('config')->depth(0)->files()->name('database.sql');
        foreach ($files as $file) {
            $return = array_replace_recursive($return, \SqlFileParser::parse($file));
        }
        ksort($return);
        // HOOK: allow third-party developers to modify the array (see #3281)
        if (isset($GLOBALS['TL_HOOKS']['sqlGetFromFile']) && is_array($GLOBALS['TL_HOOKS']['sqlGetFromFile'])) {
            foreach ($GLOBALS['TL_HOOKS']['sqlGetFromFile'] as $callback) {
                $this->import($callback[0]);
                $return = $this->{$callback[0]}->{$callback[1]}($return);
            }
        }
        return $return;
    }