function LoggerChannelFactory::__get

File

core/lib/Drupal/Core/Logger/LoggerChannelFactory.php, line 115

Class

LoggerChannelFactory
Defines a factory for logging channels.

Namespace

Drupal\Core\Logger

Code

public function __get(string $name) {
    if ($name === 'container') {
        @trigger_error('Accessing the container property in ' . __CLASS__ . ' is deprecated in drupal:10.3.0 and is removed from drupal:11.0.0. Use dependency injection instead. See https://www.drupal.org/node/3416354', E_USER_DEPRECATED);
        return \Drupal::getContainer();
    }
}

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