Documentation

Upgradable

Table of Contents

upgrade()  : array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, version?: array{: array{api: array{: array{default-package-name: string, extensions: array{extensions: array}, ignore: array{paths: array}, markers: array{markers: array}, source: array{paths: array}, visibilities: non-empty-list}}, number: string}}}
Attempt to upgrade the given result of this definition to a newer version of the configuration.

Methods

upgrade()

Attempt to upgrade the given result of this definition to a newer version of the configuration.

public upgrade(array<string, mixed> $values) : array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, version?: array{: array{api: array{: array{default-package-name: string, extensions: array{extensions: array}, ignore: array{paths: array}, markers: array{markers: array}, source: array{paths: array}, visibilities: non-empty-list}}, number: string}}}

phpDocumentor attempts to auto-upgrade the configuration version to the latest version so that the internals of phpDocumentor only need to care about the format of the latest version of the configuration and the rest will be dealt with automatically.

In order to achieve this, the result of this definition is passed into this upgrade function and it should output the same settings in the structure that a newer definition expects (what that structure is depends on the version of the definition.

The 'configVersion' field in the result will inform the ConfigurationFactory what the next Configuration definition should be used to parse this result.

Parameters
$values : array<string, mixed>
Return values
array{configVersion: string, title?: string, use-cache?: bool, paths?: array{output: string, cache: string}, version?: array{: array{api: array{: array{default-package-name: string, extensions: array{extensions: array}, ignore: array{paths: array}, markers: array{markers: array}, source: array{paths: array}, visibilities: non-empty-list}}, number: string}}}

, settings?: array, templates?: non-empty-list}

Search results