aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/JsonApi/Schemas/SchemaProvider.php
blob: b6ebdf32049e4e60f4f18b6f39be3102f6657864 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php

namespace JsonApi\Schemas;

use Neomerx\JsonApi\Contracts\Schema\ContainerInterface;
use Neomerx\JsonApi\Contracts\Schema\SchemaFactoryInterface;

abstract class SchemaProvider extends \Neomerx\JsonApi\Schema\SchemaProvider
{
    private $schemaContainer;
    private $diContainer;

    /**
     * @param SchemaFactoryInterface $factory
     * @param ContainerInterface     $factory
     */
    public function __construct(SchemaFactoryInterface $factory, ContainerInterface $schemaContainer)
    {
        parent::__construct($factory);

        $this->schemaContainer = $schemaContainer;
        $this->diContainer = $factory->getDependencyInjectionContainer();
    }

    /**
     * Return the set schema container.
     *
     * @return ContainerInterface the schema container
     */
    protected function getSchemaContainer()
    {
        return $this->schemaContainer;
    }

    public function getDiContainer()
    {
        return $this->diContainer;
    }
}