LazyRecord\Schema\SchemaGenerator::writeClassTemplateToPath PHP Method

writeClassTemplateToPath() protected method

Write class template to the schema directory.
protected writeClassTemplateToPath ( ClassTemplate\ClassFile $cTemplate, $filepath ) : array
$cTemplate ClassTemplate\ClassFile
return array
    protected function writeClassTemplateToPath(ClassFile $cTemplate, $filepath)
    {
        if (false === file_put_contents($filepath, $cTemplate->render())) {
            throw RuntimeException("Can not write file {$filepath}");
        }
        return true;
    }