Download the PHP package nepster-web/php-mlm-matrix without Composer
On this page you can find all versions of the php package nepster-web/php-mlm-matrix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nepster-web/php-mlm-matrix
More information about nepster-web/php-mlm-matrix
Files in nepster-web/php-mlm-matrix
Package php-mlm-matrix
Short Description Library for working with mlm matrices
License MIT
Informations about the package php-mlm-matrix
MLM Matrix
Library for working with MLM matrices.
Did you find an error?
If you found an error in the code or grammatical mistake or any inaccuracy, please create new issues.
What is the MLM matrix?
Among the many MLM compensation plans available today, the Matrix plan is among the most popularly recommended owing to its uncomplicated structure. As it is quite simple in understanding it is considered very useful and resourceful and can be easily integrated into the MLM business.
To understand the Matrix plan, it makes sense to first understand its structure. The matrix
has fixed numbers of rows and columns, organizing the numbers in a particular width and depth.
Typically, most MLM Matrix plans follow two types of structures; 2x2 or the 3x3, but there are
exceptions based on company requirements. All the members in a Matrix Plan are positioned
serially from top to bottom or left to right.
After the matrix is filled, user at level 1 receives a reward and the matrix itself is divided into several matrices (depends on matrix pow, for example the cubic matrix will be divided into 3 new matrices). After that, new matrices wait for filling and cycle is repeated.
Install
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json file.
Structure
demo- Library demodoc- Documentation files for GitHubshema- Sample database table schema (MySQL)src- Main library codetests- Unit tests
Usage
Creating a new matrix object:
Getting information about the matrix:
Get matrix array:
Managing users in the matrix:
Check the correctness of coordinates:
Check if there are free positions in the matrix:
For more examples, see the demo file.
How can I use database for matrices?
Based on the different specifics of mlm projects and web development tools, this library implements only the algorithm of operation of mlm matrices without storage support.
However, if you works with the database you can easily implement keeping and restore of matrix objects. You can study the example in the file MySQL schema.
For example, create a new service that allows you to write and/or restore the matrix object from the database:
Testing
or
License
This library is licensed under the MIT License - see the LICENSE file for details.
All versions of php-mlm-matrix with dependencies
ext-json Version *