PHP Classes

How to Use a PHP Entity Manager that Adapts to Use Multiple Data Sources Using the Package Adaptive Entity Manager: Entity manager to work with multiple data sources

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2026-08-18 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: Not yet counted Not yet ranked
Version License PHP version Categories
aem 1.0MIT/X Consortium ...7Databases, Design Patterns, PHP 7
Description 

Author

This package provides an entity manager to work with multiple data sources.

The entity manager class that uses Doctrine and can take configuration objects as parameters to the constructor function to define adapter objects that implement different aspects of an entity manager class.

It returns an entity manager object that calls the adapter objects to implement different functions to create, retrieve, update, and delete entity objects.

Innovation Award
PHP Programming Innovation award nominee
August 2026
Nominee
Vote
Entity managers are classes that can take care of creating and retrieving objects from repositories that store the information of the objects in persistent containers.

This package uses the Doctrine project packages to implement an entity manager that can be configured to retrieve entity objects from different data sources.

Manuel Lemos
Picture of ?????? ???????
  Performance   Level  
Name: ?????? ??????? <contact>
Classes: 1 package by
Country: Russian Federation Russian Federation
Innovation award
Innovation award
Nominee: 1x

 

Instructions

Documentation

Adaptive Entity Manager

CI

A flexible PHP package implementing the Doctrine ObjectManager interface for seamlessly managing entities across different data sources: SQL databases, REST APIs, GraphQL endpoints, etc., using pluggable adapters.

Overview

Adaptive Entity Manager (AEM) is a powerful entity management system that provides a unified interface for working with entities across multiple data sources. It implements Doctrine's ObjectManager interface while offering enhanced flexibility through its adapter-based architecture.

AEM is particularly useful when you rely on Doctrine DBAL (or similar) for connections and SQL/query building, but adopting full Doctrine ORM entity mapping is impractical?for example, when integrating several external or legacy databases with uneven schemas.

In hexagonal (ports and adapters) architectures, place AEM in the infrastructure adapters behind your application or domain repositories so persistence concerns do not leak into the core model.

Documentation: docs/README.md (guides for Doctrine, DDD, hexagonal architecture, and legacy migration).

Features

  • Pluggable data source adapters
  • Unified entity management interface
  • Support for multiple data sources simultaneously
  • Value Objects support: Built-in support for immutable Value Objects with automatic conversion
  • Transaction management
  • Lazy loading through proxy objects
  • Flexible entity repository system
  • Comprehensive metadata management
  • Efficient unit of work implementation

Recent Updates (v1.6.0)

Domain value objects (metadata) and VO-aware manager API

  • Map value_object fields to domain types without `ValueObjectInterface` via metadata: `class` (preferred) or `valueObjectClass`, `from` (static factory), `to` (serialization). Details: docs/VALUE_OBJECTS.md.
  • ValueObjectAwareEntityManagerInterface carries `getValueObjectRegistry()` / `hasValueObjectSupport()`; the base EntityManagerInterface no longer declares them ? typehint the extended interface when you rely on VO registry helpers.
  • loadAll criteria apply the same object?storage rules as flush for `value_object` fields; the instance must match the property?s declared VO class.
  • Stricter config: conflicting `class` and `valueObjectClass` are rejected; conversion checks the property type before calling metadata `to`.
  • Example: examples/ddd_domain_vo_demo.php (dev autoload `Examples\Ddd\`).
  • Process-wide caveat: one shared static entity factory per PHP process ? several `EntityManager` instances with different VO/metadata setups are not fully isolated (CHANGELOG for v1.6.0, Known limitations).

Earlier in v1.5.0 ? Quality, CI, and tooling

  • CI matrix for PHP 8.1, 8.2, 8.3, and 8.4 and a CI status badge in this README.
  • PHPStan at level 5 with the PHPUnit extension, a baseline quality gate, and composer analyse / composer check scripts.
  • Targeted tests added for flush rollback on insert failure, commit event order, preFlush lifecycle, flush with default optimized metadata, `loadAll` criteria (field-to-column and boolean source values), `PersistentCollection` lazy init, and EntityManager proxy helpers.
  • English documentation roadmap / RFC updates in the repo.

Earlier in v1.5.0 ? API and documentation

  • Nullable parameters made explicit where needed for PHP 8.4 readiness.
  • Positioning refreshed around Doctrine DBAL, legacy databases, and hexagonal architectures.

Earlier in v1.4.0 ? Boolean value mapping

  • values option for boolean fields maps non-standard source flags (Y/N, 0/1, T/F) to PHP `bool`; bidirectional hydration and persistence, plus criteria mapping before adapter queries.
  • ClassMetadata::getFieldOption() for reading arbitrary field options from metadata.
  • If `values` is omitted, behavior is unchanged.

Requirements

Installation

Install the package via Composer:

composer require kabiroman/adaptive-entity-manager

Dependencies

  • doctrine/persistence: ^3.0 || ^4.0
  • laminas/laminas-code: ^4.0
  • psr/container: ^1.1 || ^2.0
  • symfony/cache: ^6.0 || ^7.0
  • symfony/string: ^6.0 || ^7.0

Basic Usage

// Create configuration
$config = new Config(
    entityFolder: "your_project_dir/src/Entity",
    entityNamespace: 'App\\Entity\\',
    cacheFolder: "your_project_dir/var/cache"
);

// Initialize the Entity Manager
$entityManager = new AdaptiveEntityManager(
    $config,
    new DefaultEntityMetadataProvider(),
    new DefaultEntityDataAdapterProvider()
);

// Work with entities
$entity = $entityManager->find(YourEntity::class, $id);
$entityManager->persist($entity);
$entityManager->flush();

Key Components

Entity Manager

The core component that manages entity operations:

$entityManager->find(Entity::class, $id);      // Find an entity by ID
$entityManager->persist($entity);              // Stage an entity for persistence
$entityManager->remove($entity);               // Stage an entity for removal
$entityManager->flush();                       // Execute all staged operations

Repositories

Custom repositories for entity-specific operations:

$repository = $entityManager->getRepository(Entity::class);
$entities = $repository->findBy(['status' => 'active']);

Unit of Work

Tracks entity states and manages transactions:

$entityManager->beginTransaction();
try {
    // Perform operations
    $entityManager->flush();
    $entityManager->commit();
} catch (\Exception $e) {
    $entityManager->rollback();
    throw $e;
}

Advanced Features

ValueObject Support

Adaptive Entity Manager provides built-in support for immutable Value Objects, allowing you to work with domain-specific types instead of primitive values.

Built-in ValueObjects

  • Email: Email validation with domain/local part extraction
  • Money: Currency-aware monetary values with arithmetic operations
  • UserId: Type-safe user identifiers with validation

Basic Usage

use Kabiroman\AEM\ValueObject\Common\Email;
use Kabiroman\AEM\ValueObject\Common\Money;
use Kabiroman\AEM\ValueObject\Converter\ValueObjectConverterRegistry;

// Enable ValueObject support
$registry = new ValueObjectConverterRegistry();
$entityManager = new AdaptiveEntityManager(
    $config,
    $metadataProvider,
    $dataAdapterProvider,
    valueObjectRegistry: $registry
);

// Using Email ValueObject
$user = new User();
$user->setEmail(new Email('user@example.com'));

// Automatic conversion during persistence
$entityManager->persist($user);  // Email converts to string
$entityManager->flush();

// Automatic conversion during hydration
$loadedUser = $entityManager->find(User::class, 1);
$email = $loadedUser->getEmail();  // Returns Email ValueObject
echo $email->getDomain();  // "example.com"

Entity Configuration

Configure your entity metadata to use ValueObjects:

// In your entity metadata class
use Kabiroman\AEM\Constant\FieldTypeEnum;
use Kabiroman\AEM\ValueObject\Common\Email;

$metadata->addField('email', FieldTypeEnum::ValueObject, Email::class);

Custom ValueObjects

Create your own ValueObjects by implementing ValueObjectInterface:

use Kabiroman\AEM\ValueObject\ValueObjectInterface;

class ProductCode implements ValueObjectInterface
{
    public function __construct(private readonly string $code)
    {
        if (!preg_match('/^[A-Z]{2}\d{4}$/', $code)) {
            throw new \InvalidArgumentException('Invalid product code format');
        }
    }

    public function toPrimitive(): string
    {
        return $this->code;
    }

    public static function fromPrimitive($value): self
    {
        return new self((string) $value);
    }

    public function equals(ValueObjectInterface $other): bool
    {
        return $other instanceof self && $this->code === $other->code;
    }

    public function __toString(): string
    {
        return $this->code;
    }
}

For complete ValueObject documentation, see docs/VALUE_OBJECTS.md.

Custom Data Adapters

Create custom adapters for different data sources by implementing the appropriate interfaces in the DataAdapter namespace.

Event System

The Adaptive Entity Manager provides a flexible event system based on PSR-14, allowing you to hook into various stages of the entity lifecycle. This enables powerful extensibility and modularity, letting you execute custom logic before or after core entity operations.

Key Events:

  • `PrePersistEvent`: Dispatched before an entity is persisted.
  • `PostPersistEvent`: Dispatched after an entity has been persisted.
  • `PreUpdateEvent`: Dispatched before an entity is updated.
  • `PostUpdateEvent`: Dispatched after an entity has been updated.
  • `PreRemoveEvent`: Dispatched before an entity is removed.
  • `PostRemoveEvent`: Dispatched after an entity has been removed.

Usage Example (Conceptual):

To listen to events, you would implement a PSR-14 compatible event listener. For example, using a simple event dispatcher (or your framework's own, like Symfony's EventDispatcher):

use Kabiroman\AEM\Event\PrePersistEvent;
use Psr\EventDispatcher\EventDispatcherInterface;

class MyEventListener
{
    public function onPrePersist(PrePersistEvent $event): void
    {
        $entity = $event->getEntity();
        // Perform custom logic before persistence, e.g., set creation date
        if (method_exists($entity, 'setCreatedAt') && $entity->getCreatedAt() === null) {
            $entity->setCreatedAt(new \DateTimeImmutable());
        }
        // You can stop propagation of the event if needed
        // $event->stopPropagation();
    }
}

// Assuming you have a PSR-14 EventDispatcher instance
/ @var EventDispatcherInterface $eventDispatcher */
$eventDispatcher = /... your event dispatcher instance .../;

// In a non-Symfony project, you might need a ListenerProvider:
// $listenerProvider = new \League\Event\ListenerProvider();
// $listenerProvider->addListener(PrePersistEvent::class, [new MyEventListener(), 'onPrePersist']);
// $eventDispatcher = new \League\Event\EventDispatcher($listenerProvider);

// Add your listener to the dispatcher
// The exact method depends on your PSR-14 implementation
$eventDispatcher->addListener(PrePersistEvent::class, [new MyEventListener(), 'onPrePersist']);

// When AdaptiveEntityManager (specifically UnitOfWork) dispatches PrePersistEvent,
// MyEventListener::onPrePersist will be called.

Data Adapter Example

The Adaptive Entity Manager allows you to create custom data adapters for different data sources. Here's a simple example of implementing a REST API data adapter for a User entity.

Basic Implementation

<?php

namespace Example\DataAdapter;

use Kabiroman\AEM\DataAdapter\AbstractDataAdapter;
use GuzzleHttp\ClientInterface;

class UserApiAdapter extends AbstractDataAdapter
{
    private const API_ENDPOINT = 'https://api.example.com/users';

    public function __construct(
        private readonly ClientInterface $httpClient
    ) {}

    public function loadById(array $identifier): ?array
    {
        $response = $this->httpClient->request('GET', self::API_ENDPOINT . '/' . $identifier['id']);
        $data = json_decode($response->getBody()->getContents(), true);
        
        if (!$data) {
            return null;
        }

        // Convert response fields from snake_case to camelCase
        $this->toCamelCaseParams($data);
        
        return $data;
    }

    public function insert(array $row): array
    {
        // Convert entity fields from camelCase to snake_case
        $this->toSnakeCaseParams($row);
        
        $response = $this->httpClient->request('POST', self::API_ENDPOINT, [
            'json' => $row
        ]);
        
        $data = json_decode($response->getBody()->getContents(), true);
        $this->toCamelCaseParams($data);
        
        return $data;
    }

    public function update(array $identifier, array $row)
    {
        $this->toSnakeCaseParams($row);
        
        $this->httpClient->request('PUT', self::API_ENDPOINT . '/' . $identifier['id'], [
            'json' => $row
        ]);
    }

    public function delete(array $identifier)
    {
        $this->httpClient->request('DELETE', self::API_ENDPOINT . '/' . $identifier['id']);
    }

    public function loadAll(
        array $criteria = [],
        ?array $orderBy = null,
        ?int $limit = null,
        ?int $offset = null
    ): array {
        $query = http_build_query(array_filter([
            'filter' => $criteria,
            'sort' => $orderBy,
            'limit' => $limit,
            'offset' => $offset,
        ]));

        $response = $this->httpClient->request('GET', self::API_ENDPOINT . '?' . $query);
        $data = json_decode($response->getBody()->getContents(), true);

        foreach ($data as &$row) {
            $this->toCamelCaseParams($row);
        }

        return $data;
    }

    public function refresh(array $identifier): array
    {
        return $this->loadById($identifier) ?? 
            throw new \RuntimeException('Entity not found');
    }
}

Usage Example

Here's how to use the custom data adapter with the Adaptive Entity Manager:

use Kabiroman\AEM\AdaptiveEntityManager;
use Kabiroman\AEM\Config;
use Example\Entity\User;
use Example\DataAdapter\UserApiAdapter;

// Create HTTP client
$httpClient = new \GuzzleHttp\Client();

// Create data adapter
$userAdapter = new UserApiAdapter($httpClient);

// Configure entity manager
$config = new Config([
    'dataAdapters' => [
        User::class => $userAdapter
    ]
]);

// Create entity manager
$entityManager = new AdaptiveEntityManager($config);

// Use the entity manager
$user = $entityManager->find(User::class, 1);
$user->setEmail('new@example.com');

$entityManager->persist($user);
$entityManager->flush();

Key Features

  • REST API Integration: Simple implementation for RESTful APIs
  • Automatic Case Conversion: Handles conversion between snake_case (API) and camelCase (entities)
  • CRUD Operations: Complete set of Create, Read, Update, and Delete operations
  • Query Support: Built-in support for filtering, sorting, and pagination
  • Clean Implementation: Extends AbstractDataAdapter for common functionality

Available Methods

| Method | Description | |--------|-------------| | loadById() | Fetches a single entity by its identifier | | insert() | Creates a new entity | | update() | Updates an existing entity | | delete() | Removes an entity | | loadAll() | Retrieves multiple entities with optional filtering | | refresh() | Reloads entity data from the data source |

Helper Methods

The AbstractDataAdapter provides useful case conversion methods:

  • `toCamelCaseParams()`: Converts array keys to camelCase
  • `toSnakeCaseParams()`: Converts array keys to snake_case

Tips

  1. Always handle data transformation between your storage format and entity format
  2. Implement proper error handling for API responses
  3. Use type hints and return types for better code reliability
  4. Consider implementing caching for frequently accessed data
  5. Follow RESTful conventions for API endpoints

Next Steps

  • Implement custom query builders for complex filtering
  • Add caching layer for better performance
  • Implement batch operations for multiple entities
  • Add logging for debugging purposes
  • Implement retry mechanisms for failed API calls

Metadata Management

Comprehensive metadata handling for entity mapping and relationship management.

Metadata example

<?php

namespace App\Metadata;

use Kabiroman\AEM\Metadata\AbstractClassMetadata;
use App\Entity\User;
use App\Entity\Role;
use App\Entity\Post;
use App\DataAdapter\UserDataAdapter;

class UserMetadata extends AbstractClassMetadata
{
    public function __construct()
    {
        $this->metadata = [
            User::class => [
                // Specify the data adapter for this entity
                'dataAdapterClass' => UserDataAdapter::class,
                
                // Define identifier fields
                'id' => [
                    'id' => [
                        'type' => 'integer',
                        'column' => 'user_id',
                        'generator' => 'AUTO'
                    ]
                ],
                
                // Define regular fields
                'fields' => [
                    'email' => [
                        'type' => 'string',
                        'column' => 'email_address',
                        'nullable' => false
                    ],
                    'username' => [
                        'type' => 'string',
                        'column' => 'username',
                        'nullable' => false
                    ],
                    'createdAt' => [
                        'type' => 'datetime',
                        'column' => 'created_at',
                        'nullable' => false
                    ]
                ],
                
                // Define relationships
                'hasOne' => [
                    'role' => [
                        'targetEntity' => Role::class,
                        'joinColumn' => [
                            'name' => 'role_id',
                            'referencedColumnName' => 'id'
                        ],
                        'fetch' => 'LAZY'
                    ]
                ],
                'hasMany' => [
                    'posts' => [
                        'targetEntity' => Post::class,
                        'mappedBy' => 'author',
                        'fetch' => 'LAZY'
                    ]
                ],
                
                // Define lifecycle callbacks
                'lifecycleCallbacks' => [
                    'prePersist' => ['setCreatedAt']
                ]
            ]
        ];
    }
}

This metadata configuration provides: - Clear mapping between database columns and entity properties - Relationship management (One-to-One, One-to-Many) - Automatic lifecycle event handling - Type safety through explicit type definitions - Flexible data adapter integration

Boolean value mapping

If your data source uses flags like Y|N, 0|1, or T|F, you can normalize them to PHP bool using the values option on a field with type => 'boolean' in your metadata:

'fields' => [
    'isActive' => [
        'type' => 'boolean',
        'column' => 'ACTIVE',
        'nullable' => false,
        'values' => [
            'Y' => true,
            'N' => false,
        ],
    ],
]

Notes: - Keys in values are matched case-insensitively for strings; exact match takes precedence. - If values is not specified, the source value is used as-is (no implicit Y/N handling). - Repository criteria on boolean fields also honor values when querying: passing ['isActive' => true] will be converted to the corresponding source value (e.g., 'Y'). Arrays in criteria (e.g., ['isActive' => [true, false]]) are mapped element-wise. - During persistence (object ? row), boolean properties are converted to the configured source representation using values (e.g., true ? 'Y').

User entity class that this metadata would describe:

<?php

namespace App\Entity;

use DateTime;
use Doctrine\Common\Collections\Collection;
use Doctrine\Common\Collections\ArrayCollection;

class User
{
    private ?int $id = null;
    private string $email;
    private string $username;
    private string $password;
    private DateTime $createdAt;
    private bool $isActive = true;
    
    private Role $role;
    private Collection $posts;
    
    public function __construct()
    {
        $this->posts = new ArrayCollection();
    }
    
    // Lifecycle callback
    public function setCreatedAt(): void
    {
        $this->createdAt = new DateTime();
    }
    
    // Getters and setters...
}

Entity Proxies

The system supports lazy loading through proxy objects, automatically generating proxy classes when needed.

Value Objects

The Adaptive Entity Manager provides powerful Value Object support for better domain modeling and type safety. Value Objects are immutable objects that are defined by their values rather than identity.

use Kabiroman\AEM\ValueObject\Common\Email;
use Kabiroman\AEM\ValueObject\Common\Money;
use Kabiroman\AEM\ValueObject\Converter\ValueObjectConverterRegistry;

// Enable Value Object support
$valueObjectRegistry = new ValueObjectConverterRegistry();
$entityManager = new AdaptiveEntityManager(
    config: $config,
    classMetadataProvider: $metadataProvider,
    entityDataAdapterProvider: $adapterProvider,
    valueObjectRegistry: $valueObjectRegistry
);

// Use Value Objects in entities
class Product
{
    private Email $contactEmail;
    private Money $price;
    
    public function setContactEmail(Email $email): void
    {
        $this->contactEmail = $email;
    }
    
    public function setPrice(Money $price): void
    {
        $this->price = $price;
    }
}

// Create and use Value Objects
$product = new Product();
$product->setContactEmail(Email::fromPrimitive('contact@example.com'));
$product->setPrice(Money::fromPrimitive(['amount' => 12500, 'currency' => 'USD']));

$entityManager->persist($product);
$entityManager->flush();

For detailed documentation on Value Objects, see docs/VALUE_OBJECTS.md.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This package is open-sourced software licensed under the MIT license.

Author

Support

For issues, questions, or contributions, please use the GitHub issue tracker.


  Files folder image Files (141)  
File Role Description
Files folder image.github (1 directory)
Files folder imagedocs (9 files, 4 directories)
Files folder imageexamples (2 files, 1 directory)
Files folder imagesrc (20 files, 10 directories)
Files folder imagetests (1 file, 4 directories)
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan-baseline.neon Data Auxiliary data
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Class source
Accessible without login Plain text file TESTING.md Data Auxiliary data

  Files folder image Files (141)  /  .github  
File Role Description
Files folder imageworkflows (1 file)

  Files folder image Files (141)  /  .github  /  workflows  
File Role Description
  Accessible without login Plain text file ci.yml Data Auxiliary data

  Files folder image Files (141)  /  docs  
File Role Description
Files folder imageadr (5 files)
Files folder imageguides (4 files)
Files folder imagerfc (5 files)
Files folder imageroadmap (2 files)
  Accessible without login Plain text file ARCHITECTURE_DIAGRAMS.md Data Auxiliary data
  Accessible without login Plain text file CACHING.md Data Auxiliary data
  Accessible without login Plain text file CLASS_DIAGRAMS.md Data Auxiliary data
  Accessible without login Plain text file COMPARISON_WITH_DOCTRINE.md Data Auxiliary data
  Accessible without login Plain text file DIAGRAMS_INDEX.md Data Auxiliary data
  Accessible without login Plain text file INTERACTION_DIAGRAMS.md Data Auxiliary data
  Accessible without login Plain text file MIGRATION_ROADMAP.md Data Auxiliary data
  Accessible without login Plain text file README.md Doc. Documentation
  Accessible without login Plain text file VALUE_OBJECTS.md Data Auxiliary data

  Files folder image Files (141)  /  docs  /  adr  
File Role Description
  Accessible without login Plain text file ADR-001-remove-static-entity-factory.md Data Auxiliary data
  Accessible without login Plain text file ADR-002-replace-me...-with-typed-dtos.md Data Auxiliary data
  Plain text file ADR-003-replace-la...string-templates.md Class Class source
  Accessible without login Plain text file ADR-004-formalize-...t-dispatch-order.md Data Auxiliary data
  Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (141)  /  docs  /  guides  
File Role Description
  Accessible without login Plain text file aem-and-ddd.md Data Auxiliary data
  Accessible without login Plain text file aem-and-doctrine.md Data Auxiliary data
  Accessible without login Plain text file aem-and-hexagonal-architecture.md Data Auxiliary data
  Accessible without login Plain text file migration-from-legacy.md Data Auxiliary data

  Files folder image Files (141)  /  docs  /  rfc  
File Role Description
  Accessible without login Plain text file README.md Doc. Documentation
  Accessible without login Plain text file RFC-001-batch-operations-interface.md Data Auxiliary data
  Accessible without login Plain text file RFC-002-phpstan-level-8-roadmap.md Data Auxiliary data
  Accessible without login Plain text file RFC-003-domain-agn...e-object-mapping.md Data Auxiliary data
  Accessible without login Plain text file RFC-004-optional-d...ne-orm-exit-path.md Data Auxiliary data

  Files folder image Files (141)  /  docs  /  roadmap  
File Role Description
  Accessible without login Plain text file open-source-maturity-roadmap.md Data Auxiliary data
  Accessible without login Plain text file tactical-plan-php-compat-and-quality.md Data Auxiliary data

  Files folder image Files (141)  /  examples  
File Role Description
Files folder imageddd_domain_vo (3 directories)
  Plain text file ddd_domain_vo_demo.php Class Class source
  Plain text file value_objects_demo.php Class Class source

  Files folder image Files (141)  /  examples  /  ddd_domain_vo  
File Role Description
Files folder imageDomain (1 file)
Files folder imageEntity (1 file)
Files folder imageMetadata (1 file)

  Files folder image Files (141)  /  examples  /  ddd_domain_vo  /  Domain  
File Role Description
  Plain text file EmailAddress.php Class Class source

  Files folder image Files (141)  /  examples  /  ddd_domain_vo  /  Entity  
File Role Description
  Plain text file NewsletterSubscriber.php Class Class source

  Files folder image Files (141)  /  examples  /  ddd_domain_vo  /  Metadata  
File Role Description
  Plain text file NewsletterSubscriberMetadata.php Class Class source

  Files folder image Files (141)  /  src  
File Role Description
Files folder imageCache (2 files)
Files folder imageConstant (2 files)
Files folder imageDataAdapter (6 files)
Files folder imageEntityProxy (2 files)
Files folder imageEvent (7 files)
Files folder imageException (1 file)
Files folder imageMapping (1 file)
Files folder imageMetadata (7 files)
Files folder imageUtil (1 file)
Files folder imageValueObject (2 files, 2 directories)
  Plain text file AdaptiveEntityManager.php Class Class source
  Plain text file ClassMetadata.php Class Class source
  Plain text file Config.php Class Class source
  Plain text file ConfigInterface.php Class Class source
  Plain text file EntityFactory.php Class Class source
  Plain text file EntityManagerInterface.php Class Class source
  Plain text file EntityPersister.php Class Class source
  Plain text file EntityPersisterFactory.php Class Class source
  Plain text file EntityRepository.php Class Class source
  Plain text file EntityRepositoryFactory.php Class Class source
  Plain text file PersistentCollection.php Class Class source
  Plain text file PersisterFactoryInterface.php Class Class source
  Plain text file PersisterInterface.php Class Class source
  Plain text file ProxyInterface.php Class Class source
  Plain text file RepositoryFactoryInterface.php Class Class source
  Plain text file TransactionalConnection.php Class Class source
  Plain text file UnitOfWork.php Class Class source
  Plain text file UnitOfWorkInterface.php Class Class source
  Plain text file ValueObjectAwareEntityFactory.php Class Class source
  Plain text file ValueObjectAwareEn...anagerInterface.php Class Class source

  Files folder image Files (141)  /  src  /  Cache  
File Role Description
  Plain text file SimpleCacheItem.php Class Class source
  Plain text file SimpleFileCache.php Class Class source

  Files folder image Files (141)  /  src  /  Constant  
File Role Description
  Accessible without login Plain text file FetchModeEnum.php Aux. Configuration script
  Accessible without login Plain text file FieldTypeEnum.php Example Example script

  Files folder image Files (141)  /  src  /  DataAdapter  
File Role Description
  Plain text file AbstractDataAdapter.php Class Class source
  Plain text file DataAdapterFactoryInterface.php Class Class source
  Plain text file DefaultEntityDataAdapterProvider.php Class Class source
  Plain text file EntityDataAdapter.php Class Class source
  Plain text file EntityDataAdapterFactory.php Class Class source
  Plain text file EntityDataAdapterProvider.php Class Class source

  Files folder image Files (141)  /  src  /  EntityProxy  
File Role Description
  Plain text file EntityProxyFactory.php Class Class source
  Plain text file EntityProxyTrait.php Class Class source

  Files folder image Files (141)  /  src  /  Event  
File Role Description
  Plain text file EntityEvent.php Class Class source
  Plain text file PostPersistEvent.php Class Class source
  Plain text file PostRemoveEvent.php Class Class source
  Plain text file PostUpdateEvent.php Class Class source
  Plain text file PrePersistEvent.php Class Class source
  Plain text file PreRemoveEvent.php Class Class source
  Plain text file PreUpdateEvent.php Class Class source

  Files folder image Files (141)  /  src  /  Exception  
File Role Description
  Plain text file CommitFailedException.php Class Class source

  Files folder image Files (141)  /  src  /  Mapping  
File Role Description
  Plain text file LifecycleCallbackHandlerTrait.php Class Class source

  Files folder image Files (141)  /  src  /  Metadata  
File Role Description
  Plain text file AbstractClassMetadata.php Class Class source
  Plain text file CachedEntityMetadataProvider.php Class Class source
  Plain text file ClassMetadataProvider.php Class Class source
  Plain text file DefaultEntityMetadataProvider.php Class Class source
  Plain text file EntityMetadataFactory.php Class Class source
  Plain text file MetadataSystemFactory.php Class Class source
  Plain text file OptimizedEntityMetadataFactory.php Class Class source

  Files folder image Files (141)  /  src  /  Util  
File Role Description
  Plain text file CacheCleaner.php Class Class source

  Files folder image Files (141)  /  src  /  ValueObject  
File Role Description
Files folder imageCommon (3 files)
Files folder imageConverter (3 files)
  Plain text file AbstractValueObject.php Class Class source
  Plain text file ValueObjectInterface.php Class Class source

  Files folder image Files (141)  /  src  /  ValueObject  /  Common  
File Role Description
  Plain text file Email.php Class Class source
  Plain text file Money.php Class Class source
  Plain text file UserId.php Class Class source

  Files folder image Files (141)  /  src  /  ValueObject  /  Converter  
File Role Description
  Plain text file DefaultValueObjectConverter.php Class Class source
  Plain text file ValueObjectConverterInterface.php Class Class source
  Plain text file ValueObjectConverterRegistry.php Class Class source

  Files folder image Files (141)  /  tests  
File Role Description
Files folder imageIntegration (8 files, 1 directory)
Files folder imageMetadata (1 file)
Files folder imageMock (1 file, 5 directories)
Files folder imageUnit (2 files, 5 directories)
  Plain text file bootstrap.php Class Class source

  Files folder image Files (141)  /  tests  /  Integration  
File Role Description
Files folder imageSupport (1 file)
  Plain text file CommitEventDispatchOrderTest.php Class Class source
  Plain text file CommitPreFlushLifecycleTest.php Class Class source
  Plain text file CommitRollbackIntegrationTest.php Class Class source
  Plain text file DomainVoMappingIntegrationTest.php Class Class source
  Plain text file EntityManagerProxyApiTest.php Class Class source
  Plain text file EntityManagerTest.php Class Class source
  Plain text file OptimizedMetadataP...IntegrationTest.php Class Class source
  Plain text file ValueObjectTest.php Class Class source

  Files folder image Files (141)  /  tests  /  Integration  /  Support  
File Role Description
  Plain text file RecordingEventDispatcher.php Class Class source

  Files folder image Files (141)  /  tests  /  Metadata  
File Role Description
  Plain text file CachedEntityMetadataProviderTest.php Class Class source

  Files folder image Files (141)  /  tests  /  Mock  
File Role Description
Files folder imageEntity (8 files)
Files folder imageMetadata (9 files)
Files folder imageOrm (3 files)
Files folder imageRepository (1 file)
Files folder imageValueObject (1 file)
  Plain text file PreFlushTracker.php Class Class source

  Files folder image Files (141)  /  tests  /  Mock  /  Entity  
File Role Description
  Plain text file AliasFieldEntity.php Class Class source
  Plain text file DomainVoBadFactoryEntity.php Class Class source
  Plain text file DomainVoConflictEntity.php Class Class source
  Plain text file DomainVoEntity.php Class Class source
  Plain text file DomainVoUnionEntity.php Class Class source
  Plain text file IntegerTypeEntity.php Class Class source
  Plain text file MockEntity.php Class Class source
  Plain text file ValueObjectEntity.php Class Class source

  Files folder image Files (141)  /  tests  /  Mock  /  Metadata  
File Role Description
  Plain text file AliasFieldEntityMetadata.php Class Class source
  Plain text file DomainVoBadFactoryEntityMetadata.php Class Class source
  Plain text file DomainVoConflictEntityMetadata.php Class Class source
  Plain text file DomainVoEntityMetadata.php Class Class source
  Plain text file DomainVoUnionEntityMetadata.php Class Class source
  Plain text file IntegerTypeEntityMetadata.php Class Class source
  Plain text file MockEntityMetadata.php Class Class source
  Plain text file MockEntityMetadataWithPreFlush.php Class Class source
  Plain text file ValueObjectEntityMetadata.php Class Class source

  Files folder image Files (141)  /  tests  /  Mock  /  Orm  
File Role Description
  Plain text file MockClassMetadataProvider.php Class Class source
  Plain text file MockEntityDataAdapter.php Class Class source
  Plain text file MockEntityDataAdapterProvider.php Class Class source

  Files folder image Files (141)  /  tests  /  Mock  /  Repository  
File Role Description
  Plain text file MockEntityRepository.php Class Class source

  Files folder image Files (141)  /  tests  /  Mock  /  ValueObject  
File Role Description
  Plain text file DomainPlainEmail.php Class Class source

  Files folder image Files (141)  /  tests  /  Unit  
File Role Description
Files folder imageConstant (1 file)
Files folder imageFactory (3 files)
Files folder imageMetadata (1 file)
Files folder imagePersistence (3 files)
Files folder imageRepository (1 file)
  Plain text file EntityFactoryIntegerTypeTest.php Class Class source
  Plain text file PersistentCollectionTest.php Class Class source

  Files folder image Files (141)  /  tests  /  Unit  /  Constant  
File Role Description
  Plain text file FieldTypeEnumTest.php Class Class source

  Files folder image Files (141)  /  tests  /  Unit  /  Factory  
File Role Description
  Plain text file EntityDataAdapterFactoryTest.php Class Class source
  Plain text file EntityFactoryTest.php Class Class source
  Plain text file EntityMetadataFactoryTest.php Class Class source

  Files folder image Files (141)  /  tests  /  Unit  /  Metadata  
File Role Description
  Plain text file ClassMetadataTest.php Class Class source

  Files folder image Files (141)  /  tests  /  Unit  /  Persistence  
File Role Description
  Plain text file EntityPersisterLoadAllTest.php Class Class source
  Plain text file EntityPersisterTest.php Class Class source
  Plain text file UnitOfWorkTest.php Class Class source

  Files folder image Files (141)  /  tests  /  Unit  /  Repository  
File Role Description
  Plain text file EntityRepositoryTest.php Class Class source

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads  
 100%
Total:0
This week:0