Completed
Push — 8.x-3.x ( e67c0e...2e01b0 )
by Philipp
02:27
created

Schema::getSchemaPlugin()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Drupal\graphql\GraphQL\Schema;
4
5
use Drupal\graphql\Plugin\GraphQL\SchemaPluginInterface;
6
use Youshido\GraphQL\Config\Schema\SchemaConfig;
7
use Youshido\GraphQL\Schema\AbstractSchema;
8
9
class Schema extends AbstractSchema {
10
11
  /**
12
   * The corresponding plugin for this schema.
13
   *
14
   * @var \Drupal\graphql\Plugin\GraphQL\SchemaPluginInterface
15
   */
16
  protected $plugin;
17
18
  /**
19
   * Schema constructor.
20
   *
21
   * @param \Drupal\graphql\Plugin\GraphQL\SchemaPluginInterface $plugin
22
   *   The corresponding plugin instance for this schema.
23
   * @param array $config
24
   *   The schema configuration array.
25
   */
26
  public function __construct(SchemaPluginInterface $plugin, array $config = []) {
27
    parent::__construct($config);
28
    $this->plugin = $plugin;
29
  }
30
31
  /**
32
   * Retrieves the schema's plugin instance.
33
   *
34
   * @return \Drupal\graphql\Plugin\GraphQL\SchemaPluginInterface
35
   *   The schema plugin instance.
36
   */
37
  public function getSchemaPlugin() {
38
    return $this->plugin;
39
  }
40
41
  /**
42
   * {@inheritdoc}
43
   */
44
  public function build(SchemaConfig $config) {
45
    // Nothing to do here.
46
  }
47
48
}
49