class Service
Same name in other branches
- 9 core/modules/system/tests/modules/new_dependency_test/src/Service.php \Drupal\new_dependency_test\Service
- 8.9.x core/modules/system/tests/modules/new_dependency_test/src/Service.php \Drupal\new_dependency_test\Service
- 10 core/modules/system/tests/modules/new_dependency_test/src/Service.php \Drupal\new_dependency_test\Service
A service that can decorated itself.
Hierarchy
- class \Drupal\new_dependency_test\Service
Expanded class hierarchy of Service
See also
new_dependency_test.services.yml
9 string references to 'Service'
- BackendCompilerPassTest::getDriverTestMysqlContainer in core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ Compiler/ BackendCompilerPassTest.php - Creates a container with a DriverTestMysql database mock definition in it.
- BackendCompilerPassTest::getMysqlContainer in core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ Compiler/ BackendCompilerPassTest.php - Creates a container with a mysql database service definition in it.
- BackendCompilerPassTest::getSqliteContainer in core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ Compiler/ BackendCompilerPassTest.php - Creates a container with a sqlite database service in it.
- BackendCompilerPassTest::testProcess in core/
tests/ Drupal/ Tests/ Core/ DependencyInjection/ Compiler/ BackendCompilerPassTest.php - Tests the process method.
- Container::resolveServicesAndParameters in core/
lib/ Drupal/ Component/ DependencyInjection/ Container.php - Resolves arguments that represent services or variables to the real values.
4 services use Service
- new_dependency_test.another_service in core/
modules/ system/ tests/ modules/ new_dependency_test/ new_dependency_test.services.yml - Drupal\new_dependency_test\Service
- new_dependency_test.another_service.decorated in core/
modules/ system/ tests/ modules/ new_dependency_test/ new_dependency_test.services.yml - Drupal\new_dependency_test\Service
- new_dependency_test.another_service_two in core/
modules/ system/ tests/ modules/ new_dependency_test/ new_dependency_test.services.yml - Drupal\new_dependency_test\Service
- new_dependency_test.another_service_two.decorated in core/
modules/ system/ tests/ modules/ new_dependency_test/ new_dependency_test.services.yml - Drupal\new_dependency_test\Service
File
-
core/
modules/ system/ tests/ modules/ new_dependency_test/ src/ Service.php, line 12
Namespace
Drupal\new_dependency_testView source
class Service {
/**
* The decorated service.
*
* @var \Drupal\new_dependency_test\Service
*/
protected $inner;
/**
* Service constructor.
*
* @param \Drupal\new_dependency_test\Service|null $inner
* The service to decorate.
*/
public function __construct(?Service $inner = NULL) {
$this->inner = $inner;
}
/**
* Determines if the service is decorated.
*
* @return bool
* TRUE if the services is decorated, FALSE if not.
*/
public function isDecorated() {
return isset($this->inner);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
Service::$inner | protected | property | The decorated service. |
Service::isDecorated | public | function | Determines if the service is decorated. |
Service::__construct | public | function | Service constructor. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.