Documentation

UnsetPropertiesGenerator
in package

FinalYes

Generates code necessary to unset all the given properties from a particular given instance string name

Table of Contents

Constants

CLOSURE_TEMPLATE  = <<<'PHP' \Closure::bind(function (\%s $instance) { %s }, $%s, %s)->__invoke($%s); PHP

Methods

generateSnippet()  : string
generateUnsetClassScopedPropertiesBlock()  : string
generateUnsetNonScopedPropertiesCode()  : string
generateUnsetScopedPropertiesCode()  : string
generateUnsetStatement()  : string

Constants

CLOSURE_TEMPLATE

private mixed CLOSURE_TEMPLATE = <<<'PHP' \Closure::bind(function (\%s $instance) { %s }, $%s, %s)->__invoke($%s); PHP

Methods

generateUnsetClassScopedPropertiesBlock()

private static generateUnsetClassScopedPropertiesBlock(ReflectionClass $declaringClass, array<string, ReflectionProperty$properties, string $instanceName) : string
Parameters
$declaringClass : ReflectionClass
$properties : array<string, ReflectionProperty>
$instanceName : string
Return values
string

generateUnsetNonScopedPropertiesCode()

private static generateUnsetNonScopedPropertiesCode(array<string, ReflectionProperty$nonScopedProperties, string $instanceName) : string
Parameters
$nonScopedProperties : array<string, ReflectionProperty>
$instanceName : string
Return values
string

generateUnsetScopedPropertiesCode()

private static generateUnsetScopedPropertiesCode(array<class-string, array<string, ReflectionProperty>> $scopedPropertyGroups, string $instanceName) : string
Parameters
$scopedPropertyGroups : array<class-string, array<string, ReflectionProperty>>
$instanceName : string
Return values
string

generateUnsetStatement()

private static generateUnsetStatement(array<string, ReflectionProperty$properties, string $instanceName) : string
Parameters
$properties : array<string, ReflectionProperty>
$instanceName : string
Return values
string

        
On this page

Search results