PHP code example of defyma / nine-grid-classification

1. Go to this page and download the library: Download defyma/nine-grid-classification library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

defyma / nine-grid-classification example snippets



...
$_9Grid = new \defyma\helper\NineGridClassification();
$_9Grid->setPoint($X, $Y, $X1, $X2, $Y1, $Y2);
$classification = $_9Grid->calculate($scoreX, $scoreY);
...


...
$_9Grid = new \defyma\helper\NineGridClassification();
$_9Grid->setPoint(6,6);
$classification = $_9Grid->calculate(1, 5);

echo $classification; \\ 7
...


...
$_9Grid = new \defyma\helper\NineGridClassification();
$_9Grid->setPoin(6,6,4,5,3,5);
$classification = $_9Grid->calculate(1, 5);

echo $classification; \\ 4
...

$X