mailpoet
/
vendor-prefixed
/
doctrine
/
persistence
/
src
/
Persistence
/
Mapping
/
StaticReflectionService.php
Driver
9 months ago
AbstractClassMetadataFactory.php
8 months ago
ClassMetadata.php
9 months ago
ClassMetadataFactory.php
9 months ago
MappingException.php
9 months ago
ProxyClassNameResolver.php
9 months ago
ReflectionService.php
9 months ago
RuntimeReflectionService.php
9 months ago
StaticReflectionService.php
9 months ago
index.php
3 years ago
StaticReflectionService.php
44 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\Persistence\Mapping; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use function strpos; |
| 6 | use function strrev; |
| 7 | use function strrpos; |
| 8 | use function substr; |
| 9 | class StaticReflectionService implements ReflectionService |
| 10 | { |
| 11 | public function getParentClasses(string $class) |
| 12 | { |
| 13 | return []; |
| 14 | } |
| 15 | public function getClassShortName(string $class) |
| 16 | { |
| 17 | $nsSeparatorLastPosition = strrpos($class, '\\'); |
| 18 | if ($nsSeparatorLastPosition !== \false) { |
| 19 | $class = substr($class, $nsSeparatorLastPosition + 1); |
| 20 | } |
| 21 | return $class; |
| 22 | } |
| 23 | public function getClassNamespace(string $class) |
| 24 | { |
| 25 | $namespace = ''; |
| 26 | if (strpos($class, '\\') !== \false) { |
| 27 | $namespace = strrev(substr(strrev($class), (int) strpos(strrev($class), '\\') + 1)); |
| 28 | } |
| 29 | return $namespace; |
| 30 | } |
| 31 | public function getClass(string $class) |
| 32 | { |
| 33 | return null; |
| 34 | } |
| 35 | public function getAccessibleProperty(string $class, string $property) |
| 36 | { |
| 37 | return null; |
| 38 | } |
| 39 | public function hasPublicMethod(string $class, string $method) |
| 40 | { |
| 41 | return \true; |
| 42 | } |
| 43 | } |
| 44 |