Пример #1
0
<?php 
echo implode(', ', \DeviceDetector\Parser\Client\Browser::getAvailableBrowsers());
?>


### List of detected browser engines:

<?php 
echo implode(', ', \DeviceDetector\Parser\Client\Browser\Engine::getAvailableEngines());
?>


### List of detected libraries:

<?php 
echo implode(', ', \DeviceDetector\Parser\Client\Library::getAvailableClients());
?>


### List of detected media players:

<?php 
echo implode(', ', \DeviceDetector\Parser\Client\MediaPlayer::getAvailableClients());
?>


### List of detected mobile apps:

<?php 
echo implode(', ', \DeviceDetector\Parser\Client\MobileApp::getAvailableClients());
?>
Пример #2
0
 /**
  * @dataProvider getFixtures
  */
 public function testParse($useragent, $client)
 {
     $LibraryParser = new Library();
     $LibraryParser->setUserAgent($useragent);
     $this->assertEquals($client, $LibraryParser->parse());
 }