2017 © Pedro Peláez
 

library datagrid

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

image

smrtr/datagrid

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  • Saturday, April 8, 2017
  • by joegreen88
  • Repository
  • 2 Watchers
  • 0 Stars
  • 987 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Smrtr DataGrid Build Status

A tool for working with 2d arrays, spreadsheets and data grids in PHP., (*1)

Examples

use Smrtr\DataGrid;

$grid = new DataGrid(
  array(
      array("First name", "Last Name", "Position", "Age"),
      "WR" => array("Wayne", "Rooney", "striker", 27),
      "KG" => array("Kieran", "Gibbs", "left back", 23),
      "GB" => array("Gareth", "Barry", "midfielder", 32),
      "TW" => array("Theo", "Walcott", "striker", 24)
  ),
  DataGrid::ASSOC_COLUMN_FIRST,
  DataGrid::ASSOC_ROW_KEYS
);

$grid->saveCSV('/path/to/file.csv');

$grid->serveJSON('download.json');

$grid2 = new DataGrid;
$grid2->loadCSV('/path/to/file.csv', true, true);

print_r(
  $grid
    ->searchRows('Age<25 + Position=striker')
    ->getRowLabels()
); // [ "TW" ]

print_r(
  $grid
    ->searchRows('Age<25 - Position=striker')
    ->getRowLabels()
); // [ "KG" ]

print_r(
  $grid
    ->searchRows('Age<30 + (Position="left back" , Position=midfielder)')
    ->getRowLabels()
); // [ "KG" ]

print_r(
  $grid
    ->searchRows('(Age<30 + Position="left back") , Position=midfielder')
    ->getRowLabels()
); // [ "KG", "GB" ]

echo $grid->row('WR')['First name']; // "Wayne"

$grid->renameColumn('First name', 'Forename');

$s = serialize($grid);

$grid = unserialize($s);

$inverse = $grid->transpose();

echo ($grid->getRowKeys() === $inverse->getColumnKeys()) ? 'Y' : 'N'; // "Y"

Install with composer

{
    "require": {
        "smrtr/datagrid": ">=1.3.2"
    }
}

composer update, (*2)

Tutorial

Click here., (*3)

The Versions

08/04 2017

dev-master

9999999-dev https://github.com/smrtr/smrtr-datagrid

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

datagrid smrtr selectors

25/04 2016

1.3.5

1.3.5.0 http://datagrid.smrtr.co.uk/

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

datagrid smrtr selectors

01/07 2015

1.3.4

1.3.4.0 http://datagrid.smrtr.co.uk/

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

datagrid smrtr selectors

28/02 2014

v1.3.3

1.3.3.0 http://datagrid.smrtr.co.uk/

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

datagrid smrtr selectors

28/02 2014

1.3.3

1.3.3.0 http://datagrid.smrtr.co.uk/

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

datagrid smrtr selectors

30/08 2013

v1.3.2

1.3.2.0 http://datagrid.smrtr.co.uk/

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

datagrid smrtr selectors

30/08 2013

1.3.2

1.3.2.0 http://datagrid.smrtr.co.uk/

Smrtr DataGrid is a searchable backend datagrid class with applications in data management, analysis and reporting.

  Sources   Download

MIT

The Requires

  • php >=5.3.0
  • ext-curl *

 

The Development Requires

datagrid smrtr selectors