class ReflectionExtension implements Reflector (View source)

The ReflectionExtension class reports information about an extension.

Properties

string $name

Methods

__construct(string $name)

Constructs a ReflectionExtension

static string|null
export(string $name, bool $return = false)

Exports a reflected extension.

string
__toString()

To string

string
getName()

Gets extension name

string|null
getVersion()

Gets extension version

array
getFunctions()

Gets extension functions

array
getConstants()

Gets constants

array
getINIEntries()

Gets extension ini entries

array
getClasses()

Gets classes

array
getClassNames()

Gets class names

array
getDependencies()

Gets dependencies

void
info()

Print extension info

bool
isPersistent()

Returns whether this extension is persistent

bool
isTemporary()

Returns whether this extension is temporary

Details

__construct(string $name)

Constructs a ReflectionExtension

Parameters

string $name

Name of the extension.

Exceptions

ReflectionException

static string|null export(string $name, bool $return = false)

Exports a reflected extension.

The output format of this function is the same as the CLI argument --re [extension].

Parameters

string $name

The reflection to export.

bool $return

Setting to {\true} will return the export, as opposed to emitting it. Setting to {\false} (the default) will do the opposite.

Return Value

string|null

string __toString()

To string

Return Value

string

Returns string representation of the object that implements this interface (and/or "__toString" magic method).

string getName()

Gets extension name

Return Value

string

The extensions name.

string|null getVersion()

Gets extension version

Return Value

string|null

The version of the extension.

array getFunctions()

Gets extension functions

Return Value

array

An associative array of {\ReflectionFunction} objects, for each function defined in the extension with the keys being the function names. If no function are defined, an empty array is returned.

array getConstants()

Gets constants

Return Value

array

An associative array with constant names as keys.

array getINIEntries()

Gets extension ini entries

Return Value

array

An associative array with the ini entries as keys, with their defined values as values.

array getClasses()

Gets classes

Return Value

array

An array of {\ReflectionClass} objects, one for each class within the extension. If no classes are defined, an empty array is returned.

array getClassNames()

Gets class names

Return Value

array

An array of class names, as defined in the extension. If no classes are defined, an empty array is returned.

array getDependencies()

Gets dependencies

Return Value

array

An associative array with dependencies as keys and either Required, Optional or Conflicts as the values.

void info()

Print extension info

Return Value

void

Print extension info

bool isPersistent()

Since: 5.4

Returns whether this extension is persistent

Return Value

bool

Returns {\true} for extensions loaded by extension, {\false} otherwise.

bool isTemporary()

Since: 5.4

Returns whether this extension is temporary

Return Value

bool

Returns {\true} for extensions loaded by {\dl()}, {\false} otherwise.