Download the PHP package cerealean/php-common-utilities without Composer

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

php-common-utilities

Build Status Latest Stable Version Total Downloads License Dependency Status

This package uses a variadic wrapper functions for core PHP functionality to make calls to those functions easier, cleaner, and reduce duplication. Please see the examples below.

Author

Installation Instructions

Using Composer

Simply add cerealean/php-common-utilities : 1.0.* to your composer.json file. For more information on composer, please go here.

Packagist

You can view all of the versions of this package on Packagist here.

Examples

Example using IsEmpty

Are you tired of writing code that looks like this?

Instead, using this package, you can write this:

Example using IsString

Instead of writing this

Write this

Variable Handling

All variable handling classes, as seen above, follow the same interface. As such, they all have the following functions:

Important Note: All functions are variadic which means they can accept any number of parameters. For more information on variadic functions, please see php.net.

Currently Supported Functionality

reminder that all below functionality implements the VariableHandling interface

Instantiated (Non-Static) Classes

This package also has instantiated versions of every class. I am a firm believer in testing all code (although this package currently doesn't have many tests) and having instantiated versions of all classes can help in your testing. By using instantiated versions of this package in your code in place of the static versions, you can mock them out in testing.

Example using IsReadable:

It would be difficult to unit test a function where you are reading from a file using core functionality

Instead, if you use the instantiated version of IsReadable

You can stub out $is_readable and control what it returns during unit testing. This is easiest to do using a Mocking/Stubbing framework.

Note: All instantiated classes are wrappers of the static classes. Calling a function from an instantiated class simply returns a call from its associated static class.

Final Notes

If there are any questions or comments please let me know. If you have any suggested functionality for this package that is not already currently implemented, feel free to suggest it or make the addition into a merge request and I will review. This is my first major standalone Github package, so feedback is always welcome. Thanks!


All versions of php-common-utilities with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
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 cerealean/php-common-utilities contains the following files

Loading the files please wait ....