Documentation ¶
Index ¶
- Constants
- Variables
- func HasExt(name string) bool
- func NewBufContext(ctx phpv.Context, b io.Writer) phpv.Context
- func ParseQueryToArray(ctx phpv.Context, q string, a *phpv.ZArray) error
- func RegisterExt(e *Ext)
- func WithConfig(parent phpv.Context, name phpv.ZString, v *phpv.ZVal) phpv.Context
- type BufContext
- type Buffer
- type Ext
- type ExtFunction
- type ExtFunctionArg
- type Flusher
- type FuncContext
- func (c *FuncContext) AsVal(ctx phpv.Context, t phpv.ZType) (phpv.Val, error)
- func (c *FuncContext) Count(ctx phpv.Context) phpv.ZInt
- func (c *FuncContext) Func() phpv.FuncContext
- func (c *FuncContext) GetType() phpv.ZType
- func (c *FuncContext) NewIterator() phpv.ZIterator
- func (c *FuncContext) OffsetExists(ctx phpv.Context, name phpv.Val) (bool, error)
- func (c *FuncContext) OffsetGet(ctx phpv.Context, name phpv.Val) (*phpv.ZVal, error)
- func (c *FuncContext) OffsetSet(ctx phpv.Context, name phpv.Val, v *phpv.ZVal) error
- func (c *FuncContext) OffsetUnset(ctx phpv.Context, name phpv.Val) error
- func (ctx *FuncContext) Parent(n int) phpv.Context
- func (c *FuncContext) This() phpv.ZObject
- func (c *FuncContext) ZVal() *phpv.ZVal
- type Global
- func (g *Global) AppendBuffer() *Buffer
- func (g *Global) Buffer() *Buffer
- func (c *Global) Call(ctx phpv.Context, f phpv.Callable, args []phpv.Runnable, this phpv.ZObject) (*phpv.ZVal, error)
- func (c *Global) CallZVal(ctx phpv.Context, f phpv.Callable, args []*phpv.ZVal, this phpv.ZObject) (*phpv.ZVal, error)
- func (g *Global) Chdir(d phpv.ZString) error
- func (g *Global) Close() error
- func (g *Global) ConstantGet(name phpv.ZString) (phpv.Val, bool)
- func (g *Global) ConstantSet(k phpv.ZString, v phpv.Val) bool
- func (c *Global) Count(ctx phpv.Context) phpv.ZInt
- func (g *Global) Deadline() (deadline time.Time, ok bool)
- func (g *Global) Exists(fn phpv.ZString) (bool, error)
- func (g *Global) Flush()
- func (g *Global) Func() phpv.FuncContext
- func (g *Global) GetClass(ctx phpv.Context, name phpv.ZString, autoload bool) (phpv.ZClass, error)
- func (g *Global) GetConfig(name phpv.ZString, def *phpv.ZVal) *phpv.ZVal
- func (g *Global) GetFunction(ctx phpv.Context, name phpv.ZString) (phpv.Callable, error)
- func (g *Global) Getenv(key string) (string, bool)
- func (g *Global) Getwd() phpv.ZString
- func (g *Global) Global() phpv.GlobalContext
- func (c *Global) Include(ctx phpv.Context, fn phpv.ZString) (*phpv.ZVal, error)
- func (c *Global) IncludeOnce(ctx phpv.Context, fn phpv.ZString) (*phpv.ZVal, error)
- func (g *Global) Loc() *phpv.Loc
- func (g *Global) MemAlloc(ctx phpv.Context, s uint64) error
- func (c *Global) NewIterator() phpv.ZIterator
- func (c *Global) OffsetExists(ctx phpv.Context, name phpv.Val) (bool, error)
- func (c *Global) OffsetGet(ctx phpv.Context, name phpv.Val) (*phpv.ZVal, error)
- func (c *Global) OffsetSet(ctx phpv.Context, name phpv.Val, v *phpv.ZVal) error
- func (c *Global) OffsetUnset(ctx phpv.Context, name phpv.Val) error
- func (g *Global) Open(fn phpv.ZString, isInclude bool) (*stream.Stream, error)
- func (c *Global) Parent(n int) phpv.Context
- func (g *Global) RegisterClass(name phpv.ZString, c phpv.ZClass) error
- func (g *Global) RegisterFunction(name phpv.ZString, f phpv.Callable) error
- func (g *Global) RegisterLazyClass(name phpv.ZString, r phpv.Runnables, p int)
- func (g *Global) RegisterLazyFunc(name phpv.ZString, r phpv.Runnables, p int)
- func (c *Global) Require(ctx phpv.Context, fn phpv.ZString) (*phpv.ZVal, error)
- func (c *Global) RequireOnce(ctx phpv.Context, fn phpv.ZString) (*phpv.ZVal, error)
- func (g *Global) RunFile(fn string) error
- func (g *Global) SetDeadline(t time.Time)
- func (g *Global) SetLocalConfig(name phpv.ZString, val *phpv.ZVal) error
- func (g *Global) SetOutput(w io.Writer)
- func (g *Global) Setenv(key, value string) error
- func (g *Global) This() phpv.ZObject
- func (g *Global) Tick(ctx phpv.Context, l *phpv.Loc) error
- func (g *Global) Unsetenv(key string) error
- func (g *Global) Write(v []byte) (int, error)
- type MemMgr
- type OpenContext
- type Process
Constants ¶
View Source
const ( BufferWrite = 0 BufferStart = 1 << iota BufferClean BufferFlush BufferFinal BufferCleanable BufferFlushable BufferRemovable )
Variables ¶
Functions ¶
func ParseQueryToArray ¶
ParseQueryToArray will parse a given query string into a ZArray with PHP parsing rules
func RegisterExt ¶
func RegisterExt(e *Ext)
Types ¶
type BufContext ¶
type Buffer ¶
type Ext ¶
type ExtFunction ¶
type ExtFunctionArg ¶
type FuncContext ¶
type FuncContext struct { phpv.Context Args []*phpv.ZVal // contains filtered or unexported fields }
func (*FuncContext) Func ¶
func (c *FuncContext) Func() phpv.FuncContext
func (*FuncContext) GetType ¶
func (c *FuncContext) GetType() phpv.ZType
func (*FuncContext) NewIterator ¶
func (c *FuncContext) NewIterator() phpv.ZIterator
func (*FuncContext) OffsetExists ¶
func (*FuncContext) OffsetUnset ¶
func (*FuncContext) This ¶
func (c *FuncContext) This() phpv.ZObject
func (*FuncContext) ZVal ¶
func (c *FuncContext) ZVal() *phpv.ZVal
type Global ¶
func (*Global) AppendBuffer ¶
func (*Global) Call ¶
func (c *Global) Call(ctx phpv.Context, f phpv.Callable, args []phpv.Runnable, this phpv.ZObject) (*phpv.ZVal, error)
perform call in new context
func (*Global) Func ¶
func (g *Global) Func() phpv.FuncContext
func (*Global) GetFunction ¶
func (*Global) Global ¶
func (g *Global) Global() phpv.GlobalContext
func (*Global) IncludeOnce ¶
func (*Global) NewIterator ¶
func (*Global) OffsetExists ¶
func (*Global) Open ¶
Open opens a file using PHP stream wrappers and returns a handler to said file.
func (*Global) RegisterClass ¶
func (*Global) RegisterFunction ¶
func (*Global) RegisterLazyClass ¶
func (*Global) RegisterLazyFunc ¶
func (*Global) RequireOnce ¶
func (*Global) SetDeadline ¶
func (*Global) SetLocalConfig ¶
type OpenContext ¶
type OpenContext int
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func NewProcess ¶
NewProcess instanciates a new instance of Process, which represents a running PHP process.
func (*Process) CommandLine ¶
CommandLine will parse arguments from the command line and configure the process accordingly. If nil is passed, then the actual command line will be parsed. In case of error, messages will be sent to stderr by default.
func (*Process) Handler ¶
Hander returns a http.Handler object suitable for use with golang standard http servers and similar.
func (*Process) SetConstant ¶
SetConstant sets a global constant, typically used to set PHP_SAPI.
Click to show internal directories.
Click to hide internal directories.