Documentation

VersionSearch
in package

Tags
author

DeviceAtlas Limited

Table of Contents

search()  : mixed
Implements a modified binary search to find a version number that exists within predefined version ranges. The binary search is run against the start version of each version range. Once a matching range is found an additional check is performed to verify the end of the range if it is defined.
__construct()  : mixed
handleEndOfRange()  : Component|null
If an end version is define verify the searchVersion is less or equal to it.

Methods

Implements a modified binary search to find a version number that exists within predefined version ranges. The binary search is run against the start version of each version range. Once a matching range is found an additional check is performed to verify the end of the range if it is defined.

public static search(mixed $components, mixed $searchVersion) : mixed
Parameters
$components : mixed
$searchVersion : mixed
Return values
mixed

__construct()

private __construct() : mixed
Return values
mixed

handleEndOfRange()

If an end version is define verify the searchVersion is less or equal to it.

private static handleEndOfRange(Component $component, Version $searchVersion) : Component|null
Parameters
$component : Component
$searchVersion : Version
Return values
Component|null

Search results