HumHub Documentation (unofficial)

StaticInstanceInterface

StaticInstanceInterface is the interface for providing static instances to classes, which can be used to obtain class meta information that can not be expressed in static methods.

For example: adjustments made by DI or behaviors reveal only at object level, but might be needed at class (static) level as well.

To implement the [[instance()]] method you may use [[StaticInstanceTrait]].

Tags
author

Paul Klimov klimov.paul@gmail.com

since
2.0.13
see
StaticInstanceTrait

Table of Contents

Methods

instance()  : static
Returns static class instance, which can be used to obtain meta information.

Methods

instance()

Returns static class instance, which can be used to obtain meta information.

public static instance([bool $refresh = false ]) : static
Parameters
$refresh : bool = false

whether to re-create static instance even, if it is already cached.

Return values
static

class instance.


        
On this page

Search results