Documentation

Semver
in package

Table of Contents

Constants

SORT_ASC  = 1
SORT_DESC  = -1

Properties

$versionParser  : VersionParser

Methods

rsort()  : array<string|int, string>
Sort given array of versions in reverse.
satisfiedBy()  : array<string|int, string>
Return all versions that satisfy given constraints.
satisfies()  : bool
Determine if given version satisfies given constraints.
sort()  : array<string|int, string>
Sort given array of versions.
usort()  : array<string|int, string>

Constants

SORT_ASC

public mixed SORT_ASC = 1

SORT_DESC

public mixed SORT_DESC = -1

Properties

Methods

rsort()

Sort given array of versions in reverse.

public static rsort(array<string|int, string> $versions) : array<string|int, string>
Parameters
$versions : array<string|int, string>
Return values
array<string|int, string>

satisfiedBy()

Return all versions that satisfy given constraints.

public static satisfiedBy(array<string|int, string> $versions, string $constraints) : array<string|int, string>
Parameters
$versions : array<string|int, string>
$constraints : string
Return values
array<string|int, string>

satisfies()

Determine if given version satisfies given constraints.

public static satisfies(string $version, string $constraints) : bool
Parameters
$version : string
$constraints : string
Return values
bool

sort()

Sort given array of versions.

public static sort(array<string|int, string> $versions) : array<string|int, string>
Parameters
$versions : array<string|int, string>
Return values
array<string|int, string>

usort()

private static usort(array<string|int, string> $versions, int $direction) : array<string|int, string>
Parameters
$versions : array<string|int, string>
$direction : int
Return values
array<string|int, string>

        
On this page

Search results