PHP Classes
elePHPant
Icontem

File: README.md

Recommend this page to a friend!
  Classes of Peter Kahl  >  Apple OS X build  >  README.md  >  Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Apple OS X build
Return OS X version from build number
Author: By
Last change: Random UA: Ability to define minimum OSX version.
Date: 5 months ago
Size: 901 bytes
 

Contents

Class file image Download

Apple OS X Build

Associative array of OS X build and version codes that can be used in various ways. Uses fuzzy matching.

Usage

use peterkahl\OSXbuild\OSXbuild;

# Takes OS X build code and returns corresponding OS X version.
echo '16E195 ............ '. OSXbuild::getVersion('16E195') ."\n";
# Let's try build code that's not in our array:
echo '15A299 ............ '. OSXbuild::getVersion('15A299') ."\n";
/*
16E195 ............ 10.12.4
15A299 ............ 10.11
*/

# Returns associative array of OS X versions.
$array = OSXbuild::getArray();

# Returns a randomly chosen OS X Calendar User Agent string.
echo OSXbuild::getCalendarUA(); # Mac+OS+X/10.12.2 (16C67) CalendarAgent/384

# Optionally, you can specify a minimum version of OS X (to get random User Agent string).
# Argument must be a string in format 'MAJOR.MINOR' (1 dot only.)
echo OSXbuild::getCalendarUA('10.10');