Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NameConverter ¶
Converter interface, takes a string and convert to another
type PhpSerializer ¶
type PhpSerializer struct { EncodeNameConverter NameConverter DecodeNameConverter NameConverter IgnoreCastErrors bool // Wether to fail on type mistmatch or ignore and continue }
Encode / Decode serialized PHP objects from Go / Golang Note that there are apparently **NO** PHP serialization format specs, so this might not be perfect. Defaults to SnakeToUnderscore & UnderscoreToSnake for Name conversion, but can be replaced.
type SnakeToUnderscore ¶
type SnakeToUnderscore struct{}
Convert snake case name to a lower case underscored name ie: "ThisIsAnExample" -> "this_is_an_example"
func (SnakeToUnderscore) Convert ¶
func (c SnakeToUnderscore) Convert(str string) string
type UnderscoreToSnake ¶
type UnderscoreToSnake struct{}
Convert an underscored name to a snake case name ie: "this_is_an_example" -> "ThisIsAnExample"
func (UnderscoreToSnake) Convert ¶
func (c UnderscoreToSnake) Convert(str string) string
Click to show internal directories.
Click to hide internal directories.