Download the PHP package geeksareforlife/utilities without Composer

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

Utilities

Latest Version on Packagist Tests Analysis Code Sniffer

This small package is simply a collection of functions that I find useful across multiple projects.

Installation

Install using Composer:

The only requirement at this time is PHP 7.1 and above.

Usage

The package provides static functions grouped into classes. See the list of functions below.

When using, you can either call the functions using the fully qualified name:

or have a use statement at the top of your file:

Arrays::sanitiseArray($array, $keys)

This function takes two arguments - the array you want to sanitise and a list of keys you want in the returned array.

For example, given this as an input array:

and the following as the list of keys:

The returned array will be:

Notice that yellow does not appear as a key.

Arrays::sanitiseArrayList($list, $keys)

This function takes the provided list of arrays and sanitises each one before returning a list of the sanitised arrays.

The individual arrays are santised in exactly the same way as noted in the previous function.

Strings::startsWith($string, $startsWith)

This function checks if the provided $string starts with $startsWith and returns either true or false.

$startsWith can be of any length. An empty string in $startsWith will return true.

Strings::endsWith($string, $endsWith)

This function checks if the provided $string ends with $endsWith and returns either true or false

$endsWith can be of any length. An empty string in $endsWith will return true.

Contributing

Firstly, I am really happy that you are thinking about contributing to this project.

You can find the Contributing Guidelines in the root of this repository.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Filing a Bug or Requesting a feature

Both of these are contributing too! You can find details on how to do both in the Contributing Guidelines.


All versions of utilities with dependencies

PHP Build Version
Package Version
Requires php Version ^5.3.3 || ^7.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 geeksareforlife/utilities contains the following files

Loading the files please wait ....