php-extended/php-data-provider-array

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

4.0.0 2022-05-30 05:48 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. Download composer.phar from their website. Then add to your composer.json :

	"require": {
		...
		"php-extended/php-data-provider-array": "^3"
		...
	}

Then run php composer.phar update to install this library. The autoloading of all classes of this library is made through composer's autoloader.

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).