You are here

class BarClass in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php \Drupal\Tests\Core\DependencyInjection\Fixture\BarClass
  2. 9 core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php \Drupal\Tests\Core\DependencyInjection\Fixture\BarClass

Stub class which acts as a service to test the container.

Hierarchy

  • class \Drupal\Tests\Core\DependencyInjection\Fixture\BarClass

Expanded class hierarchy of BarClass

See also

\Drupal\Tests\Core\DependencyInjection\ContainerBuilderTest

\Drupal\Tests\Core\DependencyInjection\Fixture\BazClass

2 files declare their use of BarClass
ContainerBuilderTest.php in core/tests/Drupal/Tests/Core/DependencyInjection/ContainerBuilderTest.php
ContainerTest.php in core/tests/Drupal/Tests/Core/DependencyInjection/ContainerTest.php

File

core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php, line 11

Namespace

Drupal\Tests\Core\DependencyInjection\Fixture
View source
class BarClass {

  /**
   * Storage for a protected BazClass object.
   *
   * @var Drupal\Tests\Core\DependencyInjection\Fixture\BazClass
   */
  protected $baz;

  /**
   * Setter for our BazClass object.
   *
   * This method is called during the service initialization.
   *
   * @param \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass $baz
   *   A BazClass object to store.
   */
  public function setBaz(BazClass $baz) {
    $this->baz = $baz;
  }

  /**
   * Getter for our BazClass object.
   *
   * @return \Drupal\Tests\Core\DependencyInjection\Fixture\BazClass
   *   The stored BazClass object.
   */
  public function getBaz() {
    return $this->baz;
  }

}

Members