@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildClass
Function: buildClass()
ts
function buildClass(
name,
options,
attributes?): PhpStmtClass;Builds a PHP class declaration statement node.
Parameters
name
The name of the class, or null for an anonymous class.
PhpIdentifier | null
options
Optional configuration for the class (flags, extends, implements, statements, attribute groups, namespaced name).
attrGroups?
extends?
PhpName | null
flags?
number
implements?
PhpName[]
namespacedName?
PhpName | null
stmts?
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpStmtClass node.
