Composer API
Class

Composer\Package\Version\VersionParser

class VersionParser extends VersionParser

Methods

parseConstraints($constraints)

{@inheritDoc}

array[] parseNameVersionPairs(array $pairs)

Parses an array of strings representing package/version pairs.

Details

at line 25
public parseConstraints($constraints)

{@inheritDoc}

Parameters

$constraints

at line 44
public array[] parseNameVersionPairs(array $pairs)

Parses an array of strings representing package/version pairs.

The parsing results in an array of arrays, each of which contain a 'name' key with value and optionally a 'version' key with value.

Parameters

array $pairs a set of package/version pairs separated by ":", "=" or " "

Return Value

array[] array of arrays containing a name and (if provided) a version