PHP code example of alexanevsky / data-resolver
1. Go to this page and download the library: Download alexanevsky/data-resolver library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alexanevsky / data-resolver example snippets
use Alexanevsky\DataResolver\Resolver;
$resolver = new Resolver();
$resolver->define('foo', 'string');
$resolver->define('bar', 'int');
$data = [
'qwerty' => 'Hello World',
'bar' => '12345'
];
$result = $resolver->resolve($data);
var_dump($result->toArray());