You are here

abstract class Base in DRD Agent 4.0.x

Same name in this branch
  1. 4.0.x src/Crypt/Base.php \Drupal\drd_agent\Crypt\Base
  2. 4.0.x src/Agent/Action/Base.php \Drupal\drd_agent\Agent\Action\Base
  3. 4.0.x src/Agent/Remote/Base.php \Drupal\drd_agent\Agent\Remote\Base
  4. 4.0.x src/Agent/Auth/Base.php \Drupal\drd_agent\Agent\Auth\Base
Same name and namespace in other branches
  1. 8.3 src/Agent/Remote/Base.php \Drupal\drd_agent\Agent\Remote\Base

Base class for Remote DRD Remote Methods.

Hierarchy

Expanded class hierarchy of Base

File

src/Agent/Remote/Base.php, line 17

Namespace

Drupal\drd_agent\Agent\Remote
View source
abstract class Base implements BaseInterface, ContainerInjectionInterface {

  /**
   * @var \Symfony\Component\DependencyInjection\ContainerInterface
   */
  protected $container;

  /**
   * @var \Drupal\Core\Session\AccountSwitcherInterface
   */
  protected $accountSwitcher;

  /**
   * @var \Drupal\Core\Config\ConfigFactoryInterface
   */
  protected $configFactory;

  /**
   * @var \Drupal\Core\Database\Connection
   */
  protected $database;

  /**
   * @var \Drupal\Core\Entity\EntityTypeManagerInterface
   */
  protected $entityTypeManager;

  /**
   * @var \Drupal\Core\Extension\ModuleHandlerInterface
   */
  protected $moduleHandler;

  /**
   * @var \Drupal\Component\Datetime\Time
   */
  protected $time;

  /**
   * Base constructor.
   *
   * @param \Symfony\Component\DependencyInjection\ContainerInterface $container
   * @param \Drupal\Core\Session\AccountSwitcherInterface $accountSwitcher
   * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory
   * @param \Drupal\Core\Database\Connection $database
   * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
   * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
   * @param \Drupal\Component\Datetime\Time $time
   */
  public function __construct(ContainerInterface $container, AccountSwitcherInterface $accountSwitcher, ConfigFactoryInterface $configFactory, Connection $database, EntityTypeManagerInterface $entityTypeManager, ModuleHandlerInterface $moduleHandler, Time $time) {
    $this->container = $container;
    $this->accountSwitcher = $accountSwitcher;
    $this->configFactory = $configFactory;
    $this->database = $database;
    $this->entityTypeManager = $entityTypeManager;
    $this->moduleHandler = $moduleHandler;
    $this->time = $time;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container) {
    return new static($container, $container
      ->get('account_switcher'), $container
      ->get('config.factory'), $container
      ->get('database'), $container
      ->get('entity_type.manager'), $container
      ->get('module_handler'), $container
      ->get('datetime.time'));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Base::$accountSwitcher protected property
Base::$configFactory protected property
Base::$container protected property
Base::$database protected property
Base::$entityTypeManager protected property
Base::$moduleHandler protected property
Base::$time protected property
Base::create public static function Instantiates a new instance of this class. Overrides ContainerInjectionInterface::create
Base::__construct public function Base constructor.
BaseInterface::collect public function Collect the security review results. 3