Issues (10)

config/di/content.php (1 issue)

1
<?php
2
/**
3
 * Configuration file for DI container.
4
 */
5
return [
6
7
    // Services to add to the container.
8
    "services" => [
9
        "content" => [
10
            "shared" => true,
11
            "callback" => function () {
12
                $content = new \Anax\Content\FileBasedContent();
13
                $content->setDI($this);
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
14
15
                // Load the configuration files
16
                $cfg = $this->get("configuration");
17
                $config = $cfg->load("content.php");
18
                $config = $config["config"] ?? array();
19
                $content->configure($config);
20
21
                return $content;
22
            }
23
        ],
24
    ],
25
];
26