\Composer\UtilPlatform

Platform helper for uniform platform-specific tests.

Summary

Methods
Properties
Constants
expandPath()
getUserDirectory()
isWindows()
strlen()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

expandPath()

expandPath(string  $path) : string

Parses tildes and environment variables in paths.

Parameters

string $path

Returns

string

getUserDirectory()

getUserDirectory() : string

Throws

\RuntimeException

If the user home could not reliably be determined

Returns

string —

The formal user home as detected from environment parameters

isWindows()

isWindows() : boolean

Returns

boolean —

Whether the host machine is running a Windows OS

strlen()

strlen(string  $str) : integer

Parameters

string $str

Returns

integer —

return a guaranteed binary length of the string, regardless of silly mbstring configs