twig

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Process

type Process struct {
	Cmd             *exec.Cmd
	OutPutReader    *bufio.Reader
	InputPipeReader *io.PipeReader
	InputPipeWriter *io.PipeWriter
	// contains filtered or unexported fields
}

type Twig

type Twig struct {
	ProcessPool    map[int]*Process
	ConfRoot       string
	ConfIndexPath  string
	ConfTwigPath   string
	ConfHeader     string
	ConfFooter     string
	ConfCacheDir   string
	ConfDev        bool
	ConfNumPipes   int
	ConfPhpBinPath string
}

func (*Twig) Init

func (t *Twig) Init()

func (*Twig) Render

func (t *Twig) Render(tpl string, data interface{}) string

func (*Twig) RenderDev

func (t *Twig) RenderDev(tpl string, data interface{}) string

func (*Twig) RenderPipe

func (t *Twig) RenderPipe(tpl string, data interface{}) string

func (*Twig) WarmUp

func (t *Twig) WarmUp(index int) *Process

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL