You are here

interface ReflectionService in Plug 7

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 lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/ClassMetadataFactoryTest.php
PersistentObjectTest.php in lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/PersistentObjectTest.php

File

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

Namespace

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

  /**
   * Returns an array of the parent classes (not interfaces) for the given class.
   *
   * @param string $class
   *
   * @throws \Doctrine\Common\Persistence\Mapping\MappingException
   *
   * @return array
   */
  public function getParentClasses($class);

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

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

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

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

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

}

Members

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