Menu

## ReflectionClassNewInstancePatch
in package
implements ClassPatchInterface

ReflectionClassNewInstancePatch.php : 22

ReflectionClass::newInstance patch.

Makes first argument of newInstance optional, since it works but signature is misleading

##### Tags

author

  Florian Klein florian.klein@free.fr

### Interfaces, Classes and Traits

ClassPatchInterface
  Class patch interface.

### Table of Contents

apply() : void
  Updates newInstance's first argument to make it optional
getPriority() : int
  Returns patch priority, which determines when patch will be applied.
supports() : bool
  Supports ReflectionClass

### Methods

#### apply()

ReflectionClassNewInstancePatch.php : 41

Updates newInstance's first argument to make it optional

`public apply(ClassNode $node) : void`

##### Parameters

$node : ClassNode

##### Return values

void —

#### getPriority()

ReflectionClassNewInstancePatch.php : 53

Returns patch priority, which determines when patch will be applied.

`public getPriority() : int`

##### Return values

int —

Priority number (higher = earlier)

#### supports()

ReflectionClassNewInstancePatch.php : 31

Supports ReflectionClass

`public supports(ClassNode $node) : bool`

##### Parameters

$node : ClassNode

##### Return values

bool —

## Search results