Download the PHP
package anteris-dev/os-helper without Composer
On this page you can find all versions of the php package
anteris-dev/os-helper. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor anteris-dev Package os-helper Short Description Provides basic helpers for Operating System names. License
MIT
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.
Determine the Operating System your code is running on
This simple package assists with determining what Operating System your code is running on. Right now the Operating Systems supported are Linux, Mac OS, and Windows. We have implemented fallbacks for Operating Systems as well.
To Install
Find an OS that is missing?
We would love to see your contribution to this package to make it better for its users. Feel free to make a pull request to add any missing Operating Systems you stumble across.
Boolean Checks
You can use the isLinux(), isMacOs(), and isWindows() methods to run simple boolean checks about the OS.
For example:
If Statements
To make the above examples more fluent, you may also use the if methods to perform if statements.
For example:
Getting the OS Friendly Name
You can get the friendly name of the Operating System using the name() method. The OS name may span multiple words (e.g. "Mac OS") and include capitilized letters.
For example:
Getting the OS Short Name
The OS shortname is great for making comparisons with. The OS name has all spaces removed and is made to be all lowercase.
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 anteris-dev/os-helper contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.