Skip to content

omnibridge/doctrine API reference

Floor
Bridge
Version
1.x
Verified for real
Its README does not say
Licence
MIT
composer require omnibridge/doctrine:1.x-dev

Read from the package's own PHP files at the commit 945239b171f8: its namespaces, classes, interfaces and enums, their public constants, properties and methods with their PHPDoc, and the options its factories take. Nothing of it is run.

Omnibridge\Doctrine

  • DeclarationDriver class

    Doctrine's metadata of a class built from its declaration (Omnibridge\Schema\Declaration: what the class declares of its mapping, read without the ORM), no longer from its attributes: Doctrine reads the structure described outside of it (Marco's bridge principle, 2026-10-19; audit "lesringostars face au master plan", R14).

    7 methods

  • EntityManagers class

    An entity manager over an omnibase site's database, for a framework that has none of its own: attribute mapping of the given folders, omnibase's naming strategy and types, PHP's native lazy objects for proxies.

    1 method

  • MetadataDescription class

    The description (Omnibridge\Schema\Description) of what an entity manager maps: each class as its metadata hold it - table, fields, relations, inheritance, with the names its naming strategy gave - and the tables its SchemaTool would create, with their columns, keys, indexes and foreign keys.

    3 methods

  • NamingStrategy class

    Doctrine's naming strategy answered by the family's Naming (Omnibridge\Schema\Naming, omnisense/omnibridge): the names omnibase gives its tables and columns, for any framework mapping the same database - App\Entity\Thread\Tag is threadTag, App\Entity\User\Profile userProfile, Thread::$tags the join table thread_tags (thread_id, threadTag_id), a property its own name. One place says how a class becomes a table (CamelCaseNaming): omnibase's Base\Database\Mapping\NamingStrategy extends this class, and the description built without the ORM (Omnibridge\Schema\ Builder) asks the same Naming, so that both find the same tables.

    9 methods · 2 constants

  • Types class

    The DBAL types of omnibase's schema, registered as omnibase registers them (BaseBundle::boot(), BaseExtension::prependDoctrineTypes()): datetime and datetimetz written and read in UTC, utc_datetime and utc_datetime_immutable.

    1 method

Omnibridge\Doctrine\Type

  • DateTimeType class

    Doctrine's "datetime" as omnibase overrides it: written in UTC, read as UTC (omnibase's Base\Database\Type\DateTimeTypeUTC).

    2 methods

  • Utc class

    The zone moments are kept in.

    1 method

  • UtcDateTimeImmutableType class

    omnibase's utc_datetime_immutable: a moment written and read in UTC, whatever zone PHP is in.

    4 methods · 1 constant

  • UtcDateTimeType class

    omnibase's utc_datetime: a moment written and read in UTC, whatever zone PHP is in.

    4 methods · 1 constant

Omnibridge\Doctrine

DeclarationDriver class

final class DeclarationDriver implements MappingDriver DeclarationDriver.php:35

Doctrine's metadata of a class built from its declaration (Omnibridge\Schema\Declaration: what the class declares of its mapping, read without the ORM), no longer from its attributes: Doctrine reads the structure described outside of it (Marco's bridge principle, 2026-10-19; audit "lesringostars face au master plan", R14).

The declaration is read as doctrine/orm 3's AttributeDriver reads the attributes - the same calls on the ClassMetadata, in the same order, the attributes instantiated from their arguments as written - so the metadata are those it would build, to the property (the proof: omnisense/omnibase's MetadataSnapshot, every class of lesringostars, on both hosts). Which classes exist, and whether one is transient, stays the driver's it wraps (an AttributeDriver's folders, DoctrineBundle's chain); a class its declarations do not hold (an XML mapping) is left to that driver.

DeclarationDriver::__construct()

public function __construct(readonly MappingDriver $driver, readonly Declarations $declarations = new AttributeReader())

DeclarationDriver::getDriver()

public function getDriver(): MappingDriver

DeclarationDriver::getDeclarations()

public function getDeclarations(): Declarations

DeclarationDriver::getAllClassNames()

public function getAllClassNames(): array

DeclarationDriver::isTransient()

public function isTransient(string $className): bool

DeclarationDriver::__call()

public function __call(string $method, array $arguments): mixed

What else the wrapped driver answers (MappingDriverChain::getDrivers()...).

DeclarationDriver::loadMetadataForClass()

public function loadMetadataForClass(string $className, PersistenceClassMetadata $metadata): void

EntityManagers class

final class EntityManagers EntityManagers.php:23

An entity manager over an omnibase site's database, for a framework that has none of its own: attribute mapping of the given folders, omnibase's naming strategy and types, PHP's native lazy objects for proxies.

Without a cache, the metadata is kept in memory for the request (an ArrayAdapter): ORMSetup's own default, outside development, looks for APCu, Memcached, then a Redis on 127.0.0.1. $configure receives the configuration before the entity manager is built - a repository factory, filters, DQL functions: what can no longer change once it exists.

EntityManagers::create()

public static function create(Connection $connection, array $paths, bool $development = false, ?CacheItemPoolInterface $cache = null, ?\Closure $configure = null): EntityManager
$paths

the folders of the entities

MetadataDescription class

final class MetadataDescription MetadataDescription.php:42

The description (Omnibridge\Schema\Description) of what an entity manager maps: each class as its metadata hold it - table, fields, relations, inheritance, with the names its naming strategy gave - and the tables its SchemaTool would create, with their columns, keys, indexes and foreign keys.

What Doctrine resolved, written in the neutral form: compared with the description built outside Doctrine, with the database's own schema, or written to a file another persistence reads.

$values gives the values of an enumeration or a set column of a type the platform does not describe (an application's own types), null for the rest.

MetadataDescription::of()

public static function of(EntityManagerInterface $entityManager, ?array $classNames = null, ?\Closure $values = null): Description
$classNames

the classes, those the mapping driver knows when null

MetadataDescription::entity()

public static function entity(ClassMetadata $metadata): Entity

MetadataDescription::table()

public static function table(SchemaTable $table, ?\Closure $values = null): Table

NamingStrategy class

class NamingStrategy implements NamingStrategy NamingStrategy.php:19

Doctrine's naming strategy answered by the family's Naming (Omnibridge\Schema\Naming, omnisense/omnibridge): the names omnibase gives its tables and columns, for any framework mapping the same database - App\Entity\Thread\Tag is threadTag, App\Entity\User\Profile userProfile, Thread::$tags the join table thread_tags (thread_id, threadTag_id), a property its own name. One place says how a class becomes a table (CamelCaseNaming): omnibase's Base\Database\Mapping\NamingStrategy extends this class, and the description built without the ORM (Omnibridge\Schema\ Builder) asks the same Naming, so that both find the same tables.

const TABLE_NAME_SIZE = CamelCaseNaming::TABLE_NAME_SIZE
const TABLE_I18N_SUFFIX = CamelCaseNaming::TABLE_I18N_SUFFIX

NamingStrategy::__construct()

public function __construct(readonly Naming $naming = new CamelCaseNaming())

NamingStrategy::naming()

public function naming(): Naming

NamingStrategy::classToTableName()

public function classToTableName(string $className): string

NamingStrategy::propertyToColumnName()

public function propertyToColumnName(string $propertyName, string $className): string

NamingStrategy::embeddedFieldToColumnName()

public function embeddedFieldToColumnName(string $propertyName, string $embeddedColumnName, string $className, string $embeddedClassName): string

NamingStrategy::referenceColumnName()

public function referenceColumnName(): string

NamingStrategy::joinColumnName()

public function joinColumnName(string $propertyName, string $className): string

NamingStrategy::joinTableName()

public function joinTableName(string $sourceEntity, string $targetEntity, string $propertyName): string

NamingStrategy::joinKeyColumnName()

public function joinKeyColumnName(string $entityName, ?string $referencedColumnName): string

Types class

final class Types Types.php:16

The DBAL types of omnibase's schema, registered as omnibase registers them (BaseBundle::boot(), BaseExtension::prependDoctrineTypes()): datetime and datetimetz written and read in UTC, utc_datetime and utc_datetime_immutable.

Before any metadata is read: a field's type is asked while it is.

Types::register()

public static function register(): void

Omnibridge\Doctrine\Type

DateTimeType class

class DateTimeType extends DateTimeType DateTimeType.php:12

Doctrine's "datetime" as omnibase overrides it: written in UTC, read as UTC (omnibase's Base\Database\Type\DateTimeTypeUTC).

DateTimeType::convertToDatabaseValue()

public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string

DateTimeType::convertToPHPValue()

public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?\DateTime

Utc class

final class Utc Utc.php:6

The zone moments are kept in.

Utc::zone()

public static function zone(): \DateTimeZone

UtcDateTimeImmutableType class

class UtcDateTimeImmutableType extends DateTimeImmutableType UtcDateTimeImmutableType.php:9

omnibase's utc_datetime_immutable: a moment written and read in UTC, whatever zone PHP is in.

const NAME = 'utc_datetime_immutable'

UtcDateTimeImmutableType::getName()

public function getName(): string

UtcDateTimeImmutableType::requiresSQLCommentHint()

public function requiresSQLCommentHint(AbstractPlatform $platform): bool

UtcDateTimeImmutableType::convertToDatabaseValue()

public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string

UtcDateTimeImmutableType::convertToPHPValue()

public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?\DateTimeImmutable

UtcDateTimeType class

class UtcDateTimeType extends DateTimeType UtcDateTimeType.php:9

omnibase's utc_datetime: a moment written and read in UTC, whatever zone PHP is in.

const NAME = 'utc_datetime'

UtcDateTimeType::getName()

public function getName(): string

UtcDateTimeType::requiresSQLCommentHint()

public function requiresSQLCommentHint(AbstractPlatform $platform): bool

UtcDateTimeType::convertToDatabaseValue()

public function convertToDatabaseValue(mixed $value, AbstractPlatform $platform): ?string

UtcDateTimeType::convertToPHPValue()

public function convertToPHPValue(mixed $value, AbstractPlatform $platform): ?\DateTime