extgen

package
v1.9.1 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

header.go

Index

Constants

View Source
const BuildDir = "build"

Variables

This section is empty.

Functions

func NamespacedName added in v1.9.0

func NamespacedName(namespace, name string) string

NamespacedName converts a namespace and name to a C-compatible format. E.g., namespace "Go\Extension" and name "MyClass" become "Go_Extension_MyClass". This symbol remains exported, so it's usable in templates.

func SanitizePackageName

func SanitizePackageName(name string) string

EXPERIMENTAL

Types

type ConstantParser

type ConstantParser struct{}

type DocTemplateData

type DocTemplateData struct {
	BaseName  string
	Functions []phpFunction
	Classes   []phpClass
}

type DocumentationGenerator

type DocumentationGenerator struct {
	// contains filtered or unexported fields
}

type FuncParser

type FuncParser struct{}

type Generator

type Generator struct {
	BaseName   string
	SourceFile string
	BuildDir   string
	Functions  []phpFunction
	Classes    []phpClass
	Constants  []phpConstant
	Namespace  string
}

func (*Generator) Generate

func (g *Generator) Generate() error

EXPERIMENTAL

type GeneratorError

type GeneratorError struct {
	Stage   string
	Message string
	Err     error
}

func (*GeneratorError) Error

func (e *GeneratorError) Error() string

type GoFileGenerator

type GoFileGenerator struct {
	// contains filtered or unexported fields
}

type GoMethodSignature

type GoMethodSignature struct {
	MethodName string
	Params     []GoParameter
	ReturnType string
}

type GoParameter

type GoParameter struct {
	Name string
	Type string
}

type HeaderGenerator

type HeaderGenerator struct {
	// contains filtered or unexported fields
}

type NamespaceParser added in v1.9.0

type NamespaceParser struct{}

type PHPFuncGenerator

type PHPFuncGenerator struct {
	// contains filtered or unexported fields
}

type ParameterInfo

type ParameterInfo struct {
	RequiredCount int
	TotalCount    int
}

type ParameterParser

type ParameterParser struct{}

type SourceAnalyzer

type SourceAnalyzer struct{}

type SourceParser

type SourceParser struct{}

func (*SourceParser) ParseClasses

func (p *SourceParser) ParseClasses(filename string) ([]phpClass, error)

EXPERIMENTAL

func (*SourceParser) ParseConstants

func (p *SourceParser) ParseConstants(filename string) ([]phpConstant, error)

EXPERIMENTAL

func (*SourceParser) ParseFunctions

func (p *SourceParser) ParseFunctions(filename string) ([]phpFunction, error)

EXPERIMENTAL

func (*SourceParser) ParseNamespace added in v1.9.0

func (p *SourceParser) ParseNamespace(filename string) (string, error)

EXPERIMENTAL

type StubGenerator

type StubGenerator struct {
	Generator *Generator
}

type TemplateData

type TemplateData struct {
	BaseName    string
	HeaderGuard string
	Constants   []phpConstant
	Classes     []phpClass
}

type Validator

type Validator struct{}

Jump to

Keyboard shortcuts

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