class BarClass

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php \Drupal\Tests\Core\DependencyInjection\Fixture\BarClass
  2. 10 core/tests/Drupal/Tests/Core/DependencyInjection/Fixture/BarClass.php \Drupal\Tests\Core\DependencyInjection\Fixture\BarClass
  3. 11.x 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

Title Sort descending Modifiers Object type Summary
BarClass::$baz protected property Storage for a protected BazClass object.
BarClass::getBaz public function Getter for our BazClass object.
BarClass::setBaz public function Setter for our BazClass object.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.