OnlyOnOSFamilyFinder
in package
implements
CpuCoreFinder
FinalYes
Table of Contents
Interfaces
Properties
- $decoratedFinder : CpuCoreFinder
- $skippedOSFamilies : array<int, string>
Methods
- __construct() : mixed
- diagnose() : string
- Provides an explanation which may offer some insight as to what the finder will be able to find.
- find() : positive-int|null
- Find the number of CPU cores. If it could not find it, returns null. The means used to find the cores are at the implementation discretion.
- forBSD() : self
- forDarwin() : self
- forLinux() : self
- forSolaris() : self
- forWindows() : self
- toString() : string
- skip() : bool
Properties
$decoratedFinder
private
CpuCoreFinder
$decoratedFinder
$skippedOSFamilies
private
array<int, string>
$skippedOSFamilies
Methods
__construct()
public
__construct(string|array<int, string> $skippedOSFamilyOrFamilies, CpuCoreFinder $decoratedFinder) : mixed
Parameters
- $skippedOSFamilyOrFamilies : string|array<int, string>
- $decoratedFinder : CpuCoreFinder
diagnose()
Provides an explanation which may offer some insight as to what the finder will be able to find.
public
diagnose() : string
This is practical to have an idea of what each finder will find collect information for the unit tests, since integration tests are quite complicated as dependent on complex infrastructures.
Return values
stringfind()
Find the number of CPU cores. If it could not find it, returns null. The means used to find the cores are at the implementation discretion.
public
find() : positive-int|null
Return values
positive-int|nullforBSD()
public
static forBSD(CpuCoreFinder $decoratedFinder) : self
Parameters
- $decoratedFinder : CpuCoreFinder
Return values
selfforDarwin()
public
static forDarwin(CpuCoreFinder $decoratedFinder) : self
Parameters
- $decoratedFinder : CpuCoreFinder
Return values
selfforLinux()
public
static forLinux(CpuCoreFinder $decoratedFinder) : self
Parameters
- $decoratedFinder : CpuCoreFinder
Return values
selfforSolaris()
public
static forSolaris(CpuCoreFinder $decoratedFinder) : self
Parameters
- $decoratedFinder : CpuCoreFinder
Return values
selfforWindows()
public
static forWindows(CpuCoreFinder $decoratedFinder) : self
Parameters
- $decoratedFinder : CpuCoreFinder
Return values
selftoString()
public
toString() : string
Return values
stringskip()
private
skip() : bool