Download the PHP package tfhinc/ci-ray without Composer

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

Ray

Latest Version on Packagist PHP Version Total Downloads

Ray is an expressive PHP array library for the Codeigniter framework.

Requirements

Installation

Run the post install command to publish the helper and class files to the appropriate CI directories:

Loading the Library

There are a few available options for loading the Warehouse library:

Using the ray() helper function

The Ray helper function will resolve the Ray class via the CI instance. It will either load the class or return the existing class instance:

Using the Ray Class

The Ray class can be instantiated when you require it:

Using the Ray CI Library

The Ray class can be loaded like any other CI library:

Usage

Ray can be used in a variety of ways to manipulate and transfrom arrays.

Method Usage

Ray enables you to interact with arrays using simple methods that return a single value or a transformed array:

Method Chaining

The power of Ray is displayed when chaining methods together to manipulate an array:

Method Return Types

Ray methods will return different data types depedent on the desired outcome of the method. Each documented method definition indicates the data type returned.

Available Methods

The following methods are currently available:

sortByKeys()

Sort the array by its keys.

sortByValues()

Sort the array by its values.

has(string $key)

Determine if the array contains a given key.

contains(string $value [, string $key])

Determine if the array contains a given value.

Optionally provide a key to limit the contains() check

sum(string $key)

Get the sum of the values for the provided key.

avg(string $key)

Get the average of the values for the provided key.

count()

Get the count of the values.

values()

Get the values of the array. Can be used to reindex the array with consecutive integers.

first()

Get the first value of the array.

last()

Get the last value of the array.

except(array $keys)

Get all array elements except for the provided keys.

only(array $keys)

Only get the array elements for the provided keys.

unique([string $key])

Limit the array by unique value. Optionally limit by unique values of the provided key. The array keys are preserved. If there are duplicate values, the first key/value pair will be retained.

groupBy(string $key)

Group the array by a given key.

column(string $key, [string $key_by])

Retreive an entire column from the array. Optionally key the new transformed array by the provided key_by argument.

where(string $key, string $value)

Limit the array by a specific key and value.

whereIn(string $key, array $values)

Limit the array by a specific key and an array of values.

whereNot(string $key, string $value)

Limit the array by a given key and value.

whereNotIn(string $key, array $values)

Limit the array by a specific key and an array of values.

filter(callable $callback)

Filter the array by the provided callback.

reduce(callable $callback)

Reduce the array by a callback to a single value.

Contributing

Feel free to create a GitHub issue or send a pull request with any bug fixes. Please see the GutHub issue tracker for isses that require help.

Acknowledgements

License

The MIT License (MIT). Please see License File for more information.


All versions of ci-ray with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.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 tfhinc/ci-ray contains the following files

Loading the files please wait ....