You are here

abstract class AbstractClassLoaderDecorator in X Autoload 7.5

Same name and namespace in other branches
  1. 7.4 lib/ClassLoader/AbstractClassLoaderDecorator.php \Drupal\xautoload\ClassLoader\AbstractClassLoaderDecorator

Behaves mostly like the Symfony ClassLoader classes.

Hierarchy

Expanded class hierarchy of AbstractClassLoaderDecorator

1 file declares its use of AbstractClassLoaderDecorator
CacheMissLoaderSetFinder.php in src/CacheMissObserver/CacheMissLoaderSetFinder.php

File

src/ClassLoader/AbstractClassLoaderDecorator.php, line 10

Namespace

Drupal\xautoload\ClassLoader
View source
abstract class AbstractClassLoaderDecorator extends AbstractClassLoader {

  /**
   * @var ClassFinderInterface
   */
  protected $finder;

  /**
   * @param ClassFinderInterface $finder
   *   The object that does the actual class finding.
   */
  protected function __construct($finder) {
    $this->finder = $finder;
  }

  /**
   * Replace the finder with another one.
   *
   * @param ClassFinderInterface $finder
   *   The object that does the actual class finding.
   */
  function setFinder($finder) {
    $this->finder = $finder;
  }

  /**
   * {@inheritdoc}
   */
  function loadClass($class) {
    $this->finder
      ->loadClass($class);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractClassLoader::register function Registers this instance as an autoloader. Overrides ClassLoaderInterface::register
AbstractClassLoader::unregister function Unregister from the spl autoload stack. Overrides ClassLoaderInterface::unregister
AbstractClassLoaderDecorator::$finder protected property
AbstractClassLoaderDecorator::loadClass function Callback for class loading. This will include ("require") the file found. Overrides ClassLoaderInterface::loadClass 5
AbstractClassLoaderDecorator::setFinder function Replace the finder with another one.
AbstractClassLoaderDecorator::__construct protected function