<?php namespace MailPoet\Doctrine; if (!defined('ABSPATH')) exit; use MailPoetVendor\Doctrine\Persistence\Mapping\ProxyClassNameResolver as IProxyClassNameResolver; /** * This is exact copy of an anonymous class from \MailPoetVendor\Doctrine\Persistence\Mapping\AbstractClassMetadataFactory * We need to use a non-anonymous class so that it is serializable within integration tests * @see https://github.com/doctrine/persistence/blob/2.2.x/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php#L516-L536 */ class ProxyClassNameResolver implements IProxyClassNameResolver { /** * @template T * @return class-string<T> */ public function resolveClassName(string $className) : string { $pos = \strrpos($className, '\\' . \MailPoetVendor\Doctrine\Persistence\Proxy::MARKER . '\\'); if ($pos === \false) { /** @var class-string<T> */ return $className; } /** @var class-string<T> */ return \substr($className, $pos + \MailPoetVendor\Doctrine\Persistence\Proxy::MARKER_LENGTH + 2); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Annotations | Folder | 0755 |
|
|
EntityTraits | Folder | 0755 |
|
|
EventListeners | Folder | 0755 |
|
|
Types | Folder | 0755 |
|
|
Validator | Folder | 0755 |
|
|
ConfigurationFactory.php | File | 2.84 KB | 0644 |
|
ConnectionFactory.php | File | 3.19 KB | 0644 |
|
EntityManagerFactory.php | File | 2.5 KB | 0644 |
|
MetadataCache.php | File | 2.8 KB | 0644 |
|
PSRCacheInvalidArgumentException.php | File | 225 B | 0644 |
|
PSRCacheItem.php | File | 1010 B | 0644 |
|
PSRMetadataCache.php | File | 2.23 KB | 0644 |
|
ProxyClassNameResolver.php | File | 1.02 KB | 0644 |
|
Repository.php | File | 2.62 KB | 0644 |
|
SerializableConnection.php | File | 937 B | 0644 |
|
TablePrefixMetadataFactory.php | File | 2.46 KB | 0644 |
|
index.php | File | 0 B | 0644 |
|