Esempio n. 1
0
<?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());
?>
  and *mobile apps using [AFNetworking](https://github.com/AFNetworking/AFNetworking)*


### List of detected PIMs (personal information manager):

<?php 
echo implode(', ', \DeviceDetector\Parser\Client\PIM::getAvailableClients());
Esempio n. 2
0
 /**
  * @dataProvider getFixtures
  */
 public function testParse($useragent, $client)
 {
     $mediaPlayerParser = new MediaPlayer();
     $mediaPlayerParser->setUserAgent($useragent);
     $this->assertEquals($client, $mediaPlayerParser->parse());
 }