1. Go to this page and download the library: Download atomatis/ofm 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/ */
atomatis / ofm example snippets
declare(strict_types=1);
namespace App\Entity;
use Atomatis\OFM as OFM;
#[OFM\Entity(OFM\Entity::TYPE_YAML)]
final class Configuration
{
#[OFM\Parameter]
private ?string $foo;
#[OFM\Parameter]
private ?array $bar;
...
// getter/setter
...
// init registry with Entity file path.
$registry = new Registry();
$registry->addFile(Configuration::class, (new RegistryConfiguration())->setPath('my/file/path/configuration.yaml'));
$entityManager = new EntityManager($registry);