1. Go to this page and download the library: Download ekiwok/quick-fixtures 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/ */
$generator->addProcessor(new class implements \Ekiwok\QuickFixtures\Processor\PrioritisedProcessorInterface{
public function getPriority()
{
return 1025;
}
public function process(\Ekiwok\QuickFixtures\ContextInterface $context, $payload, \Ekiwok\QuickFixtures\GeneratorInterface $generator)
{
return new \DateTime($payload);
}
public function applies(\Ekiwok\QuickFixtures\ContextInterface $context, $payload)
{
$type = $context->getType();
// in real life we would also check payload to be sure it
// also makes sense
return $type->hasAnyClass()
&& $type->hasClass(\DateTime::class);
}
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.