Download the PHP package hkp22/php-helpers without Composer

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

PHP Helper Functions extracted from Laravel

This project has extracted useful helper functions from laravel framework, which can be used outside Laravel.

Installation

You can install the package via composer:

Usage

Arrays

array_add()

The array_add function adds a given key/value pair to an array if the given key doesn't already exist in the array:

array_build()

Build a new array using a callback.

array_divide()

The array_divide function returns two arrays, one containing the keys, and the other containing the values of the given array:

array_dot()

The array_dot function flattens a multi-dimensional array into a single level array that uses "dot" notation to indicate depth:

array_except()

The array_except function removes the given key / value pairs from an array:

array_first()

The array_first function returns the first element of an array passing a given truth test:

array_last()

The array_last function returns the last element of an array passing a given truth test:

array_flatten()

The array_flatten function flattens a multi-dimensional array into a single level array:

array_forget()

The array_forget function removes a given key / value pair from a deeply nested array using "dot" notation:

array_get()

The array_get function retrieves a value from a deeply nested array using "dot" notation:

array_set()

The array_set function sets a value within a deeply nested array using "dot" notation:

array_has()

The array_has function checks whether a given item or items exists in an array using "dot" notation:

array_only()

The array_only function returns only the specified key / value pairs from the given array:

array_pluck()

The array_pluck function retrieves all of the values for a given key from an array:

You may also specify how you wish the resulting list to be keyed:

array_pull()

The array_pull function returns and removes a key / value pair from an array:

A default value may be passed as the third argument to the method. This value will be returned if the key doesn't exist:

array_where()

The array_where function filters an array using the given Closure:

data_get()

The data_get function retrieves a value from a nested array or object using "dot" notation:

head()

The head function returns the first element in the given array:

last()

The last function returns the last element in the given array:

Strings

camel_case()

The camel_case function converts the given string to camelCase:

class_basename()

The class_basename returns the class name of the given class with the class' namespace removed:

e()

The e function runs PHP's htmlspecialchars function with the double_encode option set to true by default:

ends_with()

The ends_with function determines if the given string ends with the given value:

studly_case()

The studly_case function converts the given string to StudlyCase:

Miscellaneous

class_uses_recursive()

The class_uses_recursive function returns all traits used by a class, including traits used by all of its parent classes:

dd()

The dd function dumps the given variables and ends execution of the script:

trait_uses_recursive()

The trait_uses_recursive function returns all traits used by a trait:

value()

The value function returns the value it is given. However, if you pass a Closure to the function, the Closure will be executed then its result will be returned:


All versions of php-helpers with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.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 hkp22/php-helpers contains the following files

Loading the files please wait ....