|Last Updated|| ||Ratings|| ||Unique User Downloads|| ||Download Rankings|
|2022-12-05 (9 months ago) ||Not yet rated by the users||Total: 70 ||All time: 10,172 This week: 116|
This class can map array values with data mapper filters.
It can take an array with one or more associative data value arrays and perform several operations to transform it into the output array.
Currently, it can:
- Remove values of specific columns in all rows
- Take values of the input array with specific keys values and map them to other fundamental values of the output array
|Some applications need to process arrays that they receive from external sources like database result queries or external Web service API calls.
Sometimes the arrays do not come in the best format for those applications to process. Therefore they need to process the arrays to transform their values.
This package provides a way to transform the input arrays into other arrays that may have changed the key names of associative arrays or eliminated the array values with specific keys.
Class for mapping data by filters
composer require alexmcarrow/datamapper
'key' => 'KeyID',
'name' => 'User Name'
$rawdata = [
'key' => 'a1',
'name' => 'Alex',
'email' => 'email@example.com'
'key' => 'b2',
'name' => 'Axel'
$cleardata = DataMapper::parseMapData($rawdata, DataMapper::$FILTER_PASS_CUT, DataMapper::$FILTER_TYPE_HARD, DataMapper::$MAP_KEY, DataMapper::$MAP_VALUE);
'keyid' => 'a1',
'user name' => 'Alex'
'keyid' => 'b2',
'user name' => 'Axel'
||Applications that use this package
No pages of applications that use this class were specified.
If you know an application of this package, send a message to the author to add a link here.