Completed
Push — 1.0.x ( 54cff8...fde7fe )
by Antonio
06:25
created

RawDrupalContext::getCore()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace NuvoleWeb\Drupal\DrupalExtension\Context;
4
5
use Drupal\DrupalExtension\Context\RawDrupalContext as OriginalRawDrupalContext;
6
use Symfony\Component\DependencyInjection\ContainerBuilder;
7
8
/**
9
 * Class RawDrupalContext.
10
 *
11
 * @package NuvoleWeb\Drupal\DrupalExtension\Context
12
 */
13
class RawDrupalContext extends OriginalRawDrupalContext implements ServiceContainerAwareInterface {
14
15
  /**
16
   * Service container instance.
17
   *
18
   * @var ContainerBuilder
19
   */
20
  private $container;
21
22
  /**
23
   * {@inheritdoc}
24
   */
25
  public function setContainer(ContainerBuilder $container) {
26
    $this->container = $container;
27
  }
28
29
  /**
30
   * {@inheritdoc}
31
   */
32
  public function getContainer() {
33
    return $this->container;
34
  }
35
36
  /**
37
   * Get current Drupal core.
38
   *
39
   * @return \NuvoleWeb\Drupal\Driver\Cores\CoreInterface|\Drupal\Driver\Cores\CoreInterface
40
   *    Drupal core object instance.
41
   */
42
  public function getCore() {
43
    return $this->getDriver()->getCore();
44
  }
45
46
}
47