Download the PHP package eftec/arrayone without Composer

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

ArrayOne

It is a minimalist library that process arrays in PHP with no dependency.

This library is focused to work with business data(reading/saving files, database records, API, etc.), so it is not similar to Numpy, Pandas, NumPHP or alike because they target difference objectives. It is more closely similar to Microsoft PowerQuery and Linq. What it does? Filter, order, renaming column, grouping, validating, amongst many other operations.

Packagist Total Downloads [Maintenance]() [composer]() [php]() [php]() [CocoaPods]()

Basic examples

Getting started

First, you must install the library. You can download this library or use Composer for its installation:

composer require eftec/arrayone

Once the library is installed and included, you can use as:

Concepts

Class ArrayOne

Class ArrayOne

Method __construct()

Constructor
You can use (new ArrayOne($array))->method() or use ArrayOne::set($array)->method();

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Method avg()

Returns the average value of a specific column
Example:

Parameters:

Parameters:

Parameters:

Parameters:

Method filter()

It filters the values. If the condition is false, then the row is deleted. It uses array_filter()
The indexes are not rebuilt.
Example:

Parameters:

Parameters:

Method getAll()

Clone of a(). This method returns the whole array transformed and not only the current navigation.
Example:

Method getVersion()

It gets the current version of the library

Method group()

It groups one column and return its column grouped and values aggregated
Example:

Parameters:

Parameters:

Method join()

Joins the current array with another array
If the columns of both arrays have the same name, then the current name is retained.
Example:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Method minRow()

It finds the minimum value of a specific column and returns one or many values
Example:

Parameters:

Parameters:

Method modCol()

It adds or modify a column. Example:

Parameters:

Method offsetGet()

It gets a value of the array
Example:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Parameters:

Method sort()

Sort an array using a column or columns
Example:

Parameters:

Parameters:

condition description example work example fail expression
not negates any comparison, excepting nullable and custom functions. Example: "notint" "hello" 20 notint
nullable the value CAN be a null. **If the value is null, then it ignores other validations** null nullable
f: It calls a custom function defined in the service class. See example "hello" f:test
contain like if a text is contained in "helloworld" "hello" contain;world
alpha if the value is alphabetic "hello" "hello33" alpha
alphanumunder if the value is alphanumeric or under-case "hello_33" "hello!33" alphanumunder
alphanum if the value is alphanumeric "hello33" "hello!33" alphanum
text if the value is a text "hello" true text
regexp if the value match a regular expression. You can't use comma in the regular expression. "abc123" "xyz123" regexp;
email if the value is an email "[email protected]" "aaa.bbb.com" email
url if the value is an url [https://www.nic.cl] (https://www.nic.cl/) "aaaa" url
domain if the value is a domain [www.nic.cl] (www.nic.cl) "….." domain
minlen the value must have a minimum length "hello" "h" minlen;3
maxlen the value must have a maximum lenght "h" "hello" maxlen;3
betweenlen if the value has a size between "hello" "h" betweenlen;4,5
exist if the value exists "hi" null exist
missing if the value not exist null "hi" missing
req,required if the value is required "hi" null req,required
eq == if the value is equals to 1 0 eq;1
ne != <> if the value is not equals to 1 0 ne;0
null The value MUST be null. It is different to nullable because nullable is a "CAN" null null
empty if the value is empty "" "hello" empty
lt if the value is less than 1 10 lt;5
lte/le if the value is less or equals than 1 10 lte;5
gt if the value is great than 10 1 gt;5
gte/ge if the value is great or equals than 10 1 gte;5
between if the value is between 5 0 between;4,5
true if the value is true or 1 true false true
false if the value is false, or 0 false true false
array if the value is an array [1,2,3] 1 array
int if the value is an integer 1 "hello" int
string if the value is a string "hello" true string
float if the value is a float 333.3 "hello" float
object if the value is an object new stdClass() 1 object
in the value must be in a list

Parameters:

versions

License

Copyright Jorge Castro Castillo 2023-2024. Licensed under dual license: LGPL-3.0 and commercial license.

In short:


All versions of arrayone with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-ctype Version *
ext-json Version *
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 eftec/arrayone contains the following files

Loading the files please wait ....