PHP code example of zenify / doctrine-fixtures
1. Go to this page and download the library: Download zenify/doctrine-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/ */
zenify / doctrine-fixtures example snippets
use Zenify\DoctrineFixtures\Contract\Alice\AliceLoaderInterface;
class SomeClass
{
/**
* @var AliceLoaderInterface
*/
private $aliceLoader;
public function __construct(AliceLoaderInterface $aliceLoader)
{
$this->aliceLoader = $aliceLoader;
}
public function loadFixtures()
{
// arg can be used file(s) or dir(s) with fixtures
$entities = $this->aliceLoader->load(__DIR__ . '/fixtures');
// ...
}
}