php-extended / php-useragentstring-com-info
This package is abandoned and no longer maintained.
The author suggests using the php-extended/php-api-com-useragentstring-object package instead.
A php website wrapper to lists the information about the known user agents
3.1.11
2021-01-31 08:45 UTC
Requires
Requires (Dev)
- php-extended/php-basic-console-logger: ^3
- php-extended/php-css-selector-parser-object: ^4
- php-extended/php-html-parser-object: ^4
- php-extended/php-html-transformer-factory-object: ^3
- php-extended/php-http-client-factory-object: ^3
- php-extended/php-http-message-factory-psr17: ^3
- php-extended/placeholder-phpunit: >=1
README
A php website wrapper to lists the information about the known user agents
Installation
The installation of this library is made via composer.
Download composer.phar
from their website.
Then add to your composer.json :
"require": {
...
"php-extended/php-useragentstring-com-info": "^3",
...
}
Then run php composer.phar update
to install this library.
The autoloading of all classes of this library is made through composer's autoloader.
Basic Usage
You may use this library the following way :
use PhpExtended\UserAgent\UserAgentStringComWebsiteEndpoint;
/* @var $client \Psr\Http\Client\ClientInterface */
/* @var $uriFactory \Psr\Http\Message\UriFactory */
/* @var $requestFactory \Psr\Http\Message\RequestFactory */
/* @var $apiKey string */
$endpoint = new UserAgentStringComWebsiteEndpoint($client, $uriFactory, $requestFactory, $apiKey);
$iterator = $endpoint->getUserAgentInfoIterator(); // \Iterator of UserAgentStringComUserAgentInfo objects
foreach($iterator as $info)
{
/* @var $info \PhpExtended\UserAgent\UserAgentStringComUserAgentInfo */
$data = $endpoint->getUserAgentData($info); // UserAgentStringComUserAgentData
}
License
MIT (See license file).