123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace Doctrine\Common\Persistence\Mapping;
- use function strpos;
- use function strrev;
- use function strrpos;
- use function substr;
- /**
- * PHP Runtime Reflection Service.
- */
- class StaticReflectionService implements ReflectionService
- {
- /**
- * {@inheritDoc}
- */
- public function getParentClasses($class)
- {
- return [];
- }
- /**
- * {@inheritDoc}
- */
- public function getClassShortName($className)
- {
- if (strpos($className, '\\') !== false) {
- $className = substr($className, strrpos($className, '\\') + 1);
- }
- return $className;
- }
- /**
- * {@inheritDoc}
- */
- public function getClassNamespace($className)
- {
- $namespace = '';
- if (strpos($className, '\\') !== false) {
- $namespace = strrev(substr(strrev($className), strpos(strrev($className), '\\') + 1));
- }
- return $namespace;
- }
- /**
- * {@inheritDoc}
- */
- public function getClass($class)
- {
- return null;
- }
- /**
- * {@inheritDoc}
- */
- public function getAccessibleProperty($class, $property)
- {
- return null;
- }
- /**
- * {@inheritDoc}
- */
- public function hasPublicMethod($class, $method)
- {
- return true;
- }
- }
|