class RewriteCollection

Constants

CLASS_LEVEL

METHOD_LEVEL

CLASS_EXCLUDED_METHODS

Properties

protected array $methods

Which methods can be rewritten.

protected array $pattern

Method wildcard patterns.

protected int $level

Rewrite level.

Methods

__construct(string $class)

No description

add(string|array $methods)

Add methods or method patterns to the rewrite collection.

bool
shouldRewrite(string $method)

Determine if a method should be rewritten.

setLevel(int $level)

Set the rewrite level.

int
getLevel()

Get the rewrite level.

array
getMethods()

Get the explicit method names to rewrite.

string
getClass()

Get the class name this collection belongs to.

array
getShouldNotRewriteMethods()

Get the methods excluded by class-only rules.

Details

at line 30
__construct(string $class)

No description

Parameters

string $class

at line 37
RewriteCollection add(string|array $methods)

Add methods or method patterns to the rewrite collection.

Parameters

string|array $methods

Return Value

RewriteCollection

at line 55
bool shouldRewrite(string $method)

Determine if a method should be rewritten.

Parameters

string $method

Return Value

bool

at line 77
RewriteCollection setLevel(int $level)

Set the rewrite level.

Parameters

int $level

Return Value

RewriteCollection

at line 86
int getLevel()

Get the rewrite level.

Return Value

int

at line 94
array getMethods()

Get the explicit method names to rewrite.

Return Value

array

at line 102
string getClass()

Get the class name this collection belongs to.

Return Value

string

at line 110
array getShouldNotRewriteMethods()

Get the methods excluded by class-only rules.

Return Value

array