\DeviceAtlas\DeviceVersionSearch

Summary

Methods
Properties
Constants
search()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
__construct()
handleEndOfRange()
No private properties found
N/A

Methods

search()

search(  $components,   $searchVersion) 

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.

Parameters

$components
$searchVersion
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

__construct()

__construct() 

Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

handleEndOfRange()

handleEndOfRange(\DeviceAtlas\Device\Component  $component, \DeviceAtlas\Device\Version  $searchVersion) : \DeviceAtlas\Device\Component|null

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

Parameters

\DeviceAtlas\Device\Component $component
\DeviceAtlas\Device\Version $searchVersion
Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275 Warning: count(): Parameter must be an array or an object that implements Countable in /opt/phpdoc/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275

Returns

\DeviceAtlas\Device\Component|null