@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildNew
Function: buildNew()
ts
function buildNew(
className,
args,
attributes?): PhpExprNew;Builds a PHP new expression node.
Parameters
className
The name of the class to instantiate, either a PhpName or an expression.
args
PhpArg[] = []
An array of PhpArg nodes representing the constructor arguments.
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpExprNew node.
