Skip to content

Commit

Permalink
Update constants
Browse files Browse the repository at this point in the history
  • Loading branch information
donatj committed Aug 29, 2024
1 parent 3f9e58b commit 272733a
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 84 deletions.
4 changes: 2 additions & 2 deletions bin/constant_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
$browserBody = "{$header}namespace donatj\UserAgent;\n\ninterface Browsers {\n\n";
$maxKey = max(array_map('strlen', array_keys($browsers)));
foreach( $browsers as $const => $val ) {
$browserBody .= sprintf("\tconst %-{$maxKey}s = %s;\n", $const, var_export(key($val), true));
$browserBody .= sprintf("\tpublic const %-{$maxKey}s = %s;\n", $const, var_export(key($val), true));
}
$browserBody .= "\n}\n\n";

Expand All @@ -76,7 +76,7 @@
$platformBody = "{$header}namespace donatj\UserAgent;\n\ninterface Platforms {\n\n";
$maxKey = max(array_map('strlen', array_keys($platforms)));
foreach( $platforms as $const => $val ) {
$platformBody .= sprintf("\tconst %-{$maxKey}s = %s;\n", $const, var_export(key($val), true));
$platformBody .= sprintf("\tpublic const %-{$maxKey}s = %s;\n", $const, var_export(key($val), true));
}
$platformBody .= "\n}\n\n";

Expand Down
102 changes: 51 additions & 51 deletions src/UserAgent/Browsers.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,57 +6,57 @@

interface Browsers {

const ADSBOT_GOOGLE = 'AdsBot-Google';
const ANDROID_BROWSER = 'Android Browser';
const APPLEBOT = 'Applebot';
const BAIDUSPIDER = 'Baiduspider';
const BINGBOT = 'bingbot';
const BLACKBERRY_BROWSER = 'BlackBerry Browser';
const BROWSER = 'Browser';
const BUNJALLOO = 'Bunjalloo';
const CAMINO = 'Camino';
const CHATGPT_USER = 'ChatGPT-User';
const CHROME = 'Chrome';
const CURL = 'curl';
const EDGE = 'Edge';
const FACEBOOKEXTERNALHIT = 'facebookexternalhit';
const FEEDVALIDATOR = 'FeedValidator';
const FIREFOX = 'Firefox';
const GOOGLEBOT = 'Googlebot';
const GOOGLEBOT_IMAGE = 'Googlebot-Image';
const GOOGLEBOT_VIDEO = 'Googlebot-Video';
const GPTBOT = 'GPTBot';
const HEADLESSCHROME = 'HeadlessChrome';
const IEMOBILE = 'IEMobile';
const IMESSAGEBOT = 'iMessageBot';
const KINDLE = 'Kindle';
const LYNX = 'Lynx';
const MASTODON = 'Mastodon';
const MIDORI = 'Midori';
const MIUIBROWSER = 'MiuiBrowser';
const MSIE = 'MSIE';
const MSNBOT_MEDIA = 'msnbot-media';
const NETFRONT = 'NetFront';
const NINTENDOBROWSER = 'NintendoBrowser';
const OAI_SEARCHBOT = 'OAI-SearchBot';
const OCULUSBROWSER = 'OculusBrowser';
const OPERA = 'Opera';
const PUFFIN = 'Puffin';
const SAFARI = 'Safari';
const SAILFISHBROWSER = 'SailfishBrowser';
const SAMSUNGBROWSER = 'SamsungBrowser';
const SILK = 'Silk';
const SLACKBOT = 'Slackbot';
const TELEGRAMBOT = 'TelegramBot';
const TIZENBROWSER = 'TizenBrowser';
const TWITTERBOT = 'Twitterbot';
const UC_BROWSER = 'UC Browser';
const VALVE_STEAM_TENFOOT = 'Valve Steam Tenfoot';
const VIVALDI = 'Vivaldi';
const WGET = 'Wget';
const WORDPRESS = 'WordPress';
const YANDEX = 'Yandex';
const YANDEXBOT = 'YandexBot';
public const ADSBOT_GOOGLE = 'AdsBot-Google';
public const ANDROID_BROWSER = 'Android Browser';
public const APPLEBOT = 'Applebot';
public const BAIDUSPIDER = 'Baiduspider';
public const BINGBOT = 'bingbot';
public const BLACKBERRY_BROWSER = 'BlackBerry Browser';
public const BROWSER = 'Browser';
public const BUNJALLOO = 'Bunjalloo';
public const CAMINO = 'Camino';
public const CHATGPT_USER = 'ChatGPT-User';
public const CHROME = 'Chrome';
public const CURL = 'curl';
public const EDGE = 'Edge';
public const FACEBOOKEXTERNALHIT = 'facebookexternalhit';
public const FEEDVALIDATOR = 'FeedValidator';
public const FIREFOX = 'Firefox';
public const GOOGLEBOT = 'Googlebot';
public const GOOGLEBOT_IMAGE = 'Googlebot-Image';
public const GOOGLEBOT_VIDEO = 'Googlebot-Video';
public const GPTBOT = 'GPTBot';
public const HEADLESSCHROME = 'HeadlessChrome';
public const IEMOBILE = 'IEMobile';
public const IMESSAGEBOT = 'iMessageBot';
public const KINDLE = 'Kindle';
public const LYNX = 'Lynx';
public const MASTODON = 'Mastodon';
public const MIDORI = 'Midori';
public const MIUIBROWSER = 'MiuiBrowser';
public const MSIE = 'MSIE';
public const MSNBOT_MEDIA = 'msnbot-media';
public const NETFRONT = 'NetFront';
public const NINTENDOBROWSER = 'NintendoBrowser';
public const OAI_SEARCHBOT = 'OAI-SearchBot';
public const OCULUSBROWSER = 'OculusBrowser';
public const OPERA = 'Opera';
public const PUFFIN = 'Puffin';
public const SAFARI = 'Safari';
public const SAILFISHBROWSER = 'SailfishBrowser';
public const SAMSUNGBROWSER = 'SamsungBrowser';
public const SILK = 'Silk';
public const SLACKBOT = 'Slackbot';
public const TELEGRAMBOT = 'TelegramBot';
public const TIZENBROWSER = 'TizenBrowser';
public const TWITTERBOT = 'Twitterbot';
public const UC_BROWSER = 'UC Browser';
public const VALVE_STEAM_TENFOOT = 'Valve Steam Tenfoot';
public const VIVALDI = 'Vivaldi';
public const WGET = 'Wget';
public const WORDPRESS = 'WordPress';
public const YANDEX = 'Yandex';
public const YANDEXBOT = 'YandexBot';

}

62 changes: 31 additions & 31 deletions src/UserAgent/Platforms.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,37 @@

interface Platforms {

const MACINTOSH = 'Macintosh';
const CHROME_OS = 'Chrome OS';
const LINUX = 'Linux';
const WINDOWS = 'Windows';
const ANDROID = 'Android';
const BLACKBERRY = 'BlackBerry';
const FREEBSD = 'FreeBSD';
const IPAD = 'iPad';
const IPHONE = 'iPhone';
const IPOD = 'iPod';
const KINDLE = 'Kindle';
const KINDLE_FIRE = 'Kindle Fire';
const NETBSD = 'NetBSD';
const NEW_NINTENDO_3DS = 'New Nintendo 3DS';
const NINTENDO_3DS = 'Nintendo 3DS';
const NINTENDO_DS = 'Nintendo DS';
const NINTENDO_SWITCH = 'Nintendo Switch';
const NINTENDO_WII = 'Nintendo Wii';
const NINTENDO_WIIU = 'Nintendo WiiU';
const OPENBSD = 'OpenBSD';
const PLAYBOOK = 'PlayBook';
const PLAYSTATION_3 = 'PlayStation 3';
const PLAYSTATION_4 = 'PlayStation 4';
const PLAYSTATION_5 = 'PlayStation 5';
const PLAYSTATION_VITA = 'PlayStation Vita';
const SAILFISH = 'Sailfish';
const SYMBIAN = 'Symbian';
const TIZEN = 'Tizen';
const WINDOWS_PHONE = 'Windows Phone';
const XBOX = 'Xbox';
const XBOX_ONE = 'Xbox One';
public const MACINTOSH = 'Macintosh';
public const CHROME_OS = 'Chrome OS';
public const LINUX = 'Linux';
public const WINDOWS = 'Windows';
public const ANDROID = 'Android';
public const BLACKBERRY = 'BlackBerry';
public const FREEBSD = 'FreeBSD';
public const IPAD = 'iPad';
public const IPHONE = 'iPhone';
public const IPOD = 'iPod';
public const KINDLE = 'Kindle';
public const KINDLE_FIRE = 'Kindle Fire';
public const NETBSD = 'NetBSD';
public const NEW_NINTENDO_3DS = 'New Nintendo 3DS';
public const NINTENDO_3DS = 'Nintendo 3DS';
public const NINTENDO_DS = 'Nintendo DS';
public const NINTENDO_SWITCH = 'Nintendo Switch';
public const NINTENDO_WII = 'Nintendo Wii';
public const NINTENDO_WIIU = 'Nintendo WiiU';
public const OPENBSD = 'OpenBSD';
public const PLAYBOOK = 'PlayBook';
public const PLAYSTATION_3 = 'PlayStation 3';
public const PLAYSTATION_4 = 'PlayStation 4';
public const PLAYSTATION_5 = 'PlayStation 5';
public const PLAYSTATION_VITA = 'PlayStation Vita';
public const SAILFISH = 'Sailfish';
public const SYMBIAN = 'Symbian';
public const TIZEN = 'Tizen';
public const WINDOWS_PHONE = 'Windows Phone';
public const XBOX = 'Xbox';
public const XBOX_ONE = 'Xbox One';

}

0 comments on commit 272733a

Please sign in to comment.