kfosoft / php-accept-ratio-standard-enum
There is no license information available for the latest version (20.11) of this package.
PHP Standard Accept Ratio Enum
20.11
2020-11-27 21:05 UTC
Requires
- php: >=7.4.0
- kfosoft/php-abstract-enum: 20.11
This package is auto-updated.
Last update: 2024-10-28 06:17:07 UTC
README
Installation
Installation with Composer
Either run
php composer.phar require kfosoft/php-accept-ratio-standard-enum:"*"
or add in composer.json
"require": {
...
"kfosoft/php-accept-ratio-standard-enum":"*"
}
Well done!
API
getResolutions - Get standard resolutions.
getAcceptRatio - Get standard accept ratio.
getAcceptRatioByResolution - Get accept ratio of resolution.
getResolutionByAcceptRatio - Get resolutions of accept ratio.
Example 1
use KFOSOFT\Domain\Display\Enumeration\StandardAcceptRatio;
var_dump(StandardAcceptRatio::getAcceptRatioByResolution('1366x768'));
Result
string(4) "16:9"
Enjoy, guys!