You are here

class StaticReflectionService in Plug 7

PHP Runtime Reflection Service.

@author Benjamin Eberlei <kontakt@beberlei.de>

Hierarchy

Expanded class hierarchy of StaticReflectionService

1 file declares its use of StaticReflectionService
StaticReflectionServiceTest.php in lib/doctrine/common/tests/Doctrine/Tests/Common/Persistence/Mapping/StaticReflectionServiceTest.php

File

lib/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/StaticReflectionService.php, line 27

Namespace

Doctrine\Common\Persistence\Mapping
View source
class StaticReflectionService implements ReflectionService {

  /**
   * {@inheritDoc}
   */
  public function getParentClasses($class) {
    return array();
  }

  /**
   * {@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;
  }

}

Members

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