Bolt\Storage\Migration\Export::writeMigrationFile PHP Метод

writeMigrationFile() защищенный Метод

This function will determine what type based on extension.
protected writeMigrationFile ( array $data, boolean $last, boolean $append = false ) : array
$data array The data to write out
$last boolean Flag that indicates last record
$append boolean Whether to append or abort file writing if a file exists
Результат array
    protected function writeMigrationFile($data, $last, $append = false)
    {
        $file = (string) $this->files[$this->hash]['file'];
        if ($this->fs->exists($file) && $append === false) {
            $this->setError(true)->setErrorMessage("Specified file '{$file}' already exists!");
            return false;
        }
        try {
            $this->fs->touch($file);
        } catch (IOException $e) {
            $this->setError(true)->setErrorMessage("Specified file '{$file}' can not be created!");
            return false;
        }
        // Write them out
        return $this->files[$this->hash]['handler']->addRecord($data, $last);
    }