| Recommend this page to a friend! | 
|  Download | 
| Info | Documentation |  Files |  Install with Composer |  Download | Reputation | Support forum | Blog | Links | 
| Ratings | Unique User Downloads | Download Rankings | ||||
| Not enough user ratings | Total: 61 | All time:  10,489 This week: 49  | ||||
| Version | License | PHP version | Categories | |||
| apple-os-x-build 1.0 | Custom (specified... | 5 | PHP 5, Mac OS | 
| Description | Author | |
| This class can return OS X version from build number. | 
Associative array of OS X build and version codes that can be used in various ways. Uses fuzzy matching.
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
*/
# Are build/version data outdated? Older than 30 days:
if (OSXbuild::GetDataTimestamp() < time() - 30*86400) {
  echo 'OUTDATED';
  # Send email to admin to do something?
}
# 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');
|  Files (5) | 
| File | Role | Description | ||
|---|---|---|---|---|
|  src (2 files) | ||||
|    composer.json | Data | Auxiliary data | ||
|    LICENSE | Lic. | License text | ||
|    README.md | Doc. | Documentation | ||
|  Files (5) | / | src | 
| File | Role | Description | 
|---|---|---|
|    data.php | Aux. | Auxiliary script | 
|  OSXbuild.php | Class | Class source | 
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. | 
|  Install with Composer | 
| Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
| 100% | 
 | 
 | 
| User Comments (1) | |||||
| 
 | |||||
| Applications that use this package | 
 If you know an application of this package, send a message to the author to add a link here.
 If you know an application of this package, send a message to the author to add a link here.