src/Database/Migration/Generator.php
public function getSchemaFileData($settings)
    {
        $schemaFile = $this->getSchemaFilename($settings);
        $fileExt = pathinfo($schemaFile, PATHINFO_EXTENSION);

        if (!file_exists($schemaFile)) {
            return [];
        }

        if ($fileExt === 'php') {
            $data = $this->read($schemaFile);
        } elseif ($fileExt === 'json') {
            $content = file_get_contents($schemaFile);
            $data = json_decode($content, true);
        } else {
            throw new Exception(sprintf('Invalid schema file extension: %s', $fileExt));
        }

        return $data;
    }
public function getSchemaFileData($settings)
    {
        $schemaFile = $this->getSchemaFilename($settings);
        $fileExt = pathinfo($schemaFile, PATHINFO_EXTENSION);

        if (!file_exists($schemaFile)) {
            return [];
        }

        if ($fileExt === 'php') {
            $data = $this->read($schemaFile);
        } elseif ($fileExt === 'json') {
            $content = file_get_contents($schemaFile);
            $data = json_decode($content, true);
        } else {
            throw new Exception(sprintf('Invalid schema file extension: %s', $fileExt));
        }

        return $data;
    }
public function getSchemaFileData ( $ settings ) { $ schemaFile = $ this -> getSchemaFilename ( $ settings ) ; $ fileExt = pathinfo ( $ schemaFile , PATHINFO_EXTENSION ) ; if ( ! file_exists ( $ schemaFile ) ) { return [ ] ; } if ( $ fileExt === 'php' ) { $ data = $ this -> read ( $ schemaFile ) ; } elseif ( $ fileExt === 'json' ) { $ content = file_get_contents ( $ schemaFile ) ; $ data = json_decode ( $ content , true ) ; } else { throw new Exception ( sprintf ( 'Invalid schema file extension: %s' , $ fileExt ) ) ; } return $ data ; }
Get schema data.

@param array $settings

@return array
@throws Exception
Get schema data .