Download the PHP package jomisacu/enumerations without Composer

On this page you can find all versions of the php package jomisacu/enumerations. 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 enumerations

enumerations

A simple class to handle enumerations

why?

In some situations we have to handle groups of static values, enumerations comes to deal with these values in a safe way. Instead of write raw values in your code you can use objects, preventing typo errors and behaviour bugs. It is not about wraps values into constants, not, you can use TypeHint to avoid wrong calls in methods and constructors.

Use cases

Static values: statuses, database enums and options

If you have a currier system you can handle the package states using enumerations: sent, in way, received. Example:

Now, you can handle these values in a safe way.

External values

In some situations we need to handle values that can change by external reasons. Imagine an university that offers multiple college career and by convention they take the decision of apply three code character. Over the time, careers are added, subjects change, etc., etc. So they decide add a prefix to expand the size of code and maintain the same size for all. i.e: Software Engineer could have the code 'XYZ' but after change could be '0XYZ'.

The previous change introduces the problems below:

  1. Logic broken because the raw values in the code not have mean
  2. The values in the database are now corrupted because no match with the real values
  3. No safe way to replace the values in a production system, we need to catch errors by the way

The solutions are the enumerations. See the example...

Enjoy it!


All versions of enumerations with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1|^8.0
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 jomisacu/enumerations contains the following files

Loading the files please wait ....