Documentation

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
link
https://www.jetbrains.com/help/phpstorm/2021.3/ide-advanced-metadata.html

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

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
$this

addExpectedArguments()

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
$this

addOverrideMap()

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
$this

registerArgumentsSet()

public registerArgumentsSet(string $name, mixed ...$args) : mixed
Parameters
$name : string
$args : mixed

        
On this page

Search results