php-extended/php-data-provider-array

An implementation of php-extended/php-data-provider-interface that gets its data from php arrays

7.0.6 2024-07-31 13:56 UTC

README

An implementation of php-extended/php-data-provider-interface that gets its data from php arrays.

coverage build status

Installation

The installation of this library is made via composer and the autoloading of all classes of this library is made through their autoloader.

  • Download composer.phar from their website.
  • Then run the following command to install this library as dependency :
  • php composer.phar php-extended/php-data-provider-array ^7

Basic Usage

You may use this library the following way :


use PhpExtended\DataProvider\ArrayObjectProvider;

$provider = new ArrayObjectProvider(['foo' => 'bar']);

foreach($provider->provideIterator() as $line => $data)
{
	// do something with $data = ['foo' => 'bar']
}

License

MIT (See license file).