()
| 15 | } |
| 16 | |
| 17 | func (sg *StubGenerator) generate() error { |
| 18 | filename := filepath.Join(sg.Generator.BuildDir, sg.Generator.BaseName+".stub.php") |
| 19 | content, err := sg.buildContent() |
| 20 | if err != nil { |
| 21 | return err |
| 22 | } |
| 23 | |
| 24 | return writeFile(filename, content) |
| 25 | } |
| 26 | |
| 27 | func (sg *StubGenerator) buildContent() (string, error) { |
| 28 | tmpl, err := template.New("stub.php.tpl").Funcs(template.FuncMap{ |