PhpStormMetadata
in package
Utility class for building new metadata files. For example:
$builder = new PhpStormMetadata('foobar', CLASS); $builder->addOverrideMap('\Foo::bar()', ['gee' => '\Whiz\Bang']); $builder->write();
Tags
Table of Contents
Properties
- $attribution : string
- The party responsible for building this thing.
- $buffer : string
- $name : string
- Short symbolic name. Maps to filename.
Methods
- __construct() : mixed
- addExitPoint() : $this
- addExpectedArguments() : $this
- addOverrideMap() : $this
- registerArgumentsSet() : mixed
- write() : void
- Write the metadata to its file.
Properties
$attribution
The party responsible for building this thing.
protected
string
$attribution
$buffer
protected
string
$buffer
$name
Short symbolic name. Maps to filename.
protected
string
$name
Methods
__construct()
public
__construct(string $name, string $attribution) : mixed
Parameters
- $name : string
-
Short symbolic name. This will be used in the filename.
- $attribution : string
-
The party responsible for running this builder. If someone finds buggy, where should they look first?
addExitPoint()
public
addExitPoint(string $for) : $this
Parameters
- $for : string
Return values
$thisaddExpectedArguments()
public
addExpectedArguments(string $for, int $index, string $argumentSet) : $this
Parameters
- $for : string
-
Ex: '\Civi\Core\SettingsBag::get()'
- $index : int
-
The positional offset among the arguments
- $argumentSet : string
-
Name of the argument set. (This should already be defined by
registerArgumentsSet()
.)
Return values
$thisaddOverrideMap()
public
addOverrideMap(string $for, array<string|int, mixed> $map) : $this
Parameters
- $for : string
- $map : array<string|int, mixed>
-
Array(string $parameterId => string $className)
Return values
$thisregisterArgumentsSet()
public
registerArgumentsSet(string $name, mixed ...$args) : mixed
Parameters
- $name : string
- $args : mixed
write()
Write the metadata to its file.
public
write() : void