Documentation ¶
Overview ¶
Package gmvc provides basic object classes for MVC.
Index ¶
- type Controller
- type Model
- type View
- func (view *View) Assign(key string, value interface{})
- func (view *View) Assigns(data gview.Params)
- func (view *View) BindFunc(name string, function interface{})
- func (view *View) Display(file ...string) error
- func (view *View) DisplayContent(content string) error
- func (view *View) LockFunc(f func(data gview.Params))
- func (view *View) Parse(file string) ([]byte, error)
- func (view *View) ParseContent(content string) ([]byte, error)
- func (view *View) RLockFunc(f func(data gview.Params))
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct { Request *ghttp.Request // 请求数据对象 Response *ghttp.Response // 返回数据对象(r.Response) Server *ghttp.Server // Web Server对象(r.Server) Cookie *ghttp.Cookie // COOKIE操作对象(r.Cookie) Session *ghttp.Session // SESSION操作对象 View *View // 视图对象 }
控制器基类
type View ¶
type View struct {
// contains filtered or unexported fields
}
基于控制器注册的MVC视图基类(一个请求一个视图对象,用完即销毁)
func (*View) ParseContent ¶
直接解析模板内容,并返回解析后的内容
Click to show internal directories.
Click to hide internal directories.