Download the PHP package kwenziwa/devicedetector without Composer

On this page you can find all versions of the php package kwenziwa/devicedetector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package devicedetector

Device Detector

Device Detector is a convenient package for applications, offering easy detection of user devices and their operating systems. Utilizing the mobiledetect/mobiledetectlib library, this package enables applications to quickly identify device types (mobile, tablet, desktop) and operating systems (iOS, Android, etc.), enhancing the user experience and providing valuable insights.

Features

Installation

Install the package via composer:

Usage

After installation, you can use the DeviceDetector in your application as follows:

Methods

isMobile()

Determines if the user's device is a mobile phone.

isTablet()

Determines if the user's device is a tablet.

isDesktop()

Determines if the user's device is a desktop. This is typically the default if the device is neither a mobile nor a tablet.

isIOS()

Checks if the user's device is running iOS.

isAndroidOS()

Checks if the user's device is running Android OS.

getDeviceType()

Returns the type of the user's device as a string ('mobile', 'tablet', or 'desktop').

getOSType()

Returns the operating system of the user's device as a string (e.g., 'iOS', 'Android', 'Windows Mobile', 'BlackBerry', 'Symbian', or 'Unknown').

getBrowser()

Returns the the browser name system of the user's device as a string.

Run the Tests

Run the tests using the PHPUnit command:

This command will execute all tests in your tests directory. The above tests are basic and might not effectively cover all scenarios since the actual device type and OS will depend on the environment where the tests are run. In a more comprehensive test suite, you would mock the MobileDetect class to simulate different devices and operating systems. This would allow you to test all branches of your code.

Contributing

Contributions are welcome and will be fully credited. We accept contributions via Pull Requests on Github.

License

The Device Detector is open-sourced software licensed under the MIT license.


All versions of devicedetector with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
mobiledetect/mobiledetectlib Version ^2.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kwenziwa/devicedetector contains the following files

Loading the files please wait ....