Download the PHP package mrself/sync without Composer
On this page you can find all versions of the php package mrself/sync. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package sync
// From array to array
$sync = Sync::make([
'source' => ['a' => 1],
'target' => [],
'mapping' => ['a']
]);
$sync->getTarget()['a'] === 1;
// =======
// From array to object
$targetObject = (object) [];
$sync = Sync::make([
'source' => ['a' => 1],
'target' => $targetObject,
'mapping' => ['a']
]);
$targetObject->a === 1;
// =======
// Extending from Sync
// Formatting values
$target = [];
$source = ['a' => 1];
$mapping = ['a'];
$sync = new class extends Sync {
public function formatA($value)
{
return $value + 1;
}
};
$sync->init(compact('target', 'source', 'mapping'));
$sync->sync();
All versions of sync with dependencies
PHP Build Version
Package Version
Requires
symfony/validator Version
^5.2
mrself/data-transformers Version ^1.2
mrself/util Version ^1.12
mrself/property Version ^1.7
mrself/options Version ^2.19.5
psr/log Version ^1.1
mrself/data-transformers Version ^1.2
mrself/util Version ^1.12
mrself/property Version ^1.7
mrself/options Version ^2.19.5
psr/log Version ^1.1
The package mrself/sync contains the following files
Loading the files please wait ....