@wpkernel/php-json-ast v0.12.6-beta.3
@wpkernel/php-json-ast / buildPropertyHook
Function: buildPropertyHook()
ts
function buildPropertyHook(
name,
body,
options,
attributes?): PhpPropertyHook;Builds a PHP property hook node.
Parameters
name
The name of the property hook (e.g., __get, __set).
body
The body of the property hook, either an expression or an array of statements.
options
Optional configuration for the property hook (attribute groups, flags, by reference, parameters).
attrGroups?
byRef?
boolean
flags?
number
params?
PhpParam[]
attributes?
Readonly<Record<string, unknown>>
Optional attributes for the node.
Returns
A PhpPropertyHook node.
