Download the PHP package sevens/vars without Composer

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

About SevenVars

=> Simple Variable library Package For Validating, Encoding and Manipulating Strings and Arrays.

=> Seven Vars is developed by Elisha Temiloluwa a.k.a TemmyScope    

=> Seven Vars is a library that comes with a Validation Class, 
Arrays Manipulation Class and Strings Generation, Encoding, Sanitization & Manipulation Class

=> The Arrays library of the SevenVars Package implements the Countable, 
ArrayAccess & Serializable interface(s) of the Standard PHP Library and provides 
you a plethora of methods to manipulate an array of arrays i.e. a level II deep array.

=> The Strings Class allows developers encode, manipulate, sanitize and generate truly random strings.

=> The Validation Class takes in an array and rules for validating whether the value assigned to each key
in the array is a valid entry. 

Installation

Usage: Seven\Vars\Arrays HOW-TO

In order for the library to generate expected outputs, initialize with a valid array of arrays.
Completely unit tested

- Valid Input Sample

Note: All methods and operations available to objects of the Countable, ArrayAccess and Serializable interfaces are implemented/declared exactly as defined.

- Initialization

- Safe Initialization: From an array of objects E.g. Laravel's Collection

You can always use the safe Initialization when you are not sure of what type of data is contained in your array i.e. array of arrays OR array of objects

- Adding an array to the existing arrays

- Merging array of arrays to the existing one

- Adding an array to each array in the existing array of arrays

- Pop off and return the last array

- Pop off and return an array containing the last key => value in each array

- Shift off and return the first array

- Shift off and return an array containing the first key => value in each array

- Sort based on key: sorts the arrays based on the value attached to the passed key
 in ascending order: from smallest to highest

- Sort based on key: sorts the arrays based on the value attached to the passed key
 in ascending order: from highest to smallest.

- Sort based on key: sorts the arrays based on the value attached to the passed key
 in ascending order: from highest to smallest.

- Last: get the last array from the arrays

- First: get the first array from the arrays

- apply a callable on all the arrays using their keys: alias => map()

An array reference will be passed to your callable and your callable must return the array, else all values will be NULL

- sets a new value for each of the arrays using each of the key -> value pair passed;
if an index is passed, only the key at that array index will be changed

- renames a key in each of the arrays using each of the key -> value pair passed;
* if an index is passed, only the key at that array index will be changed

- delete an array from a collection if it violates a validation rule

- concatenates values of a particular key of multiple arrays using the passed 
separator and saving it on the new name

- Extract key from the initial array using the key, value pair in the passed argument

- Extracts all the arrays containing the passed key

- Extracts from all the arrays, if it contains the passed key

- Excludes all array containing the passed key

- Exclude keys from the initial array using the key, value pair in the passed argument

- Exclude keys from the initial array

- Returns an array of arrays from the initial array containing only the keys specified in the argument

- picks out random arrays
* the set size has to be smaller than the total size of the array being processed

- search the value in a key if it contains a certain string

- Returns an array of arrays from the initial array containing only arrays that
values matching those of the keys specified in the argument;

- Returns an array of the size and start position specified

- checks if the key exists in at least one of the arrays

- yields a list-like array containing [index, array] like python enumerate method

- Returns the count of arrays

- checks if the array is empty

- For returning the array at its current state

- For serializing and unserializing

- Return the arrays as JSON ecoded data

- Return the arrays as an iterable array of objects => equivalent to laravel's collection

Usage: Seven\Vars\Strings HOW-TO

Most methods of this class are static, hence do not require initialization Non static methods in this class are used for encoding, encryption and decryption

- Initialization & Usage: If you'd be using the encryption & decryption feature, It's essential
you construct the object passing necessary variables

- Check for the position of a string in another string

- For generating truly random strings

- Several other methods to format, remove and fix HTML tags; generate time From string etc.

Usage: Seven\Vars\Validation HOW-TO

In order for the library to generate expected outputs, always initialize with a valid array. The library comes in handy when dealing with arrays such as $_POST, $_GET etc.

- Initialization

- Validation Rules

- Validation Passed or Failed

- Validation Errors

Returns an array containing the first encountered error.
Returns an empty array, if all the validation rules passed successfully

- Then - Catch Syntax from JavaScript ES6

The callable passed into the "Then" method is called if validation passed.
The catch method is loaded instead if validation failed.

Both Then & Catch accept callables => closure, array callable, function


All versions of vars with dependencies

PHP Build Version
Package Version
Requires php Version >=7.2.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 sevens/vars contains the following files

Loading the files please wait ....