interface ReflectionService

Very simple reflection service abstraction.

This is required inside metadata layers that may require either static or runtime reflection.

@author Benjamin Eberlei <kontakt@beberlei.de>

Hierarchy

Expanded class hierarchy of ReflectionService

All classes that implement ReflectionService

2 files declare their use of ReflectionService
ClassMetadataFactoryTest.php in drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php
PersistentObjectTest.php in drupal/core/vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/ReflectionService.php, line 30

Namespace

Doctrine\Common\Persistence\Mapping
View source
interface ReflectionService {

  /**
   * Return an array of the parent classes (not interfaces) for the given class.
   *
   * @param string $class
   * @return array
   */
  function getParentClasses($class);

  /**
   * Return the shortname of a class.
   *
   * @param string $class
   * @return string
   */
  function getClassShortName($class);

  /**
   * @param string $class
   * @return string
   */
  function getClassNamespace($class);

  /**
   * Return a reflection class instance or null
   *
   * @param string $class
   * @return \ReflectionClass|null
   */
  function getClass($class);

  /**
   * Return an accessible property (setAccessible(true)) or null.
   *
   * @param string $class
   * @param string $property
   * @return \ReflectionProperty|null
   */
  function getAccessibleProperty($class, $property);

  /**
   * Check if the class have a public method with the given name.
   *
   * @param mixed $class
   * @param mixed $method
   * @return bool
   */
  function hasPublicMethod($class, $method);

}

Members

Namesort descending Modifiers Type Description Overrides
ReflectionService::getAccessibleProperty function Return an accessible property (setAccessible(true)) or null. 2
ReflectionService::getClass function Return a reflection class instance or null 2
ReflectionService::getClassNamespace function 2
ReflectionService::getClassShortName function Return the shortname of a class. 2
ReflectionService::getParentClasses function Return an array of the parent classes (not interfaces) for the given class. 2
ReflectionService::hasPublicMethod function Check if the class have a public method with the given name. 2