| 1 |
<?php |
| 2 |
/** |
| 3 |
* @license MIT License https://github.com/serbanghita/Mobile-Detect/blob/master/LICENSE.txt |
| 4 |
* @link http://mobiledetect.net |
| 5 |
* |
| 6 |
* Compile the providers list. |
| 7 |
* The providers list is updated weekly. |
| 8 |
* You can contribute by adding new user agents and tests. |
| 9 |
*/ |
| 10 |
|
| 11 |
// Setup. |
| 12 |
$includeBasePath = dirname(__FILE__) . '/providers/vendors'; |
| 13 |
$list = array(); |
| 14 |
|
| 15 |
// Scan. |
| 16 |
$dir = new DirectoryIterator($includeBasePath); |
| 17 |
foreach ($dir as $fileInfo) { |
| 18 |
if ($fileInfo->isDot()) { |
| 19 |
continue; |
| 20 |
} |
| 21 |
$listNew = include $includeBasePath . '/' . $fileInfo->getFilename(); |
| 22 |
if (is_array($listNew)) { |
| 23 |
$list = array_merge($list, $listNew); |
| 24 |
} |
| 25 |
} |
| 26 |
|
| 27 |
return $list; |
| 28 |
|