SnapshotterModule::publish()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace Spiral;
4
5
use Spiral\Core\DirectoriesInterface;
6
use Spiral\Modules\ModuleInterface;
7
use Spiral\Modules\PublisherInterface;
8
use Spiral\Modules\RegistratorInterface;
9
10
/**
11
 * Spiral Framework.
12
 *
13
 * @license   MIT
14
 * @author    Valentin V (vvval)
15
 */
16
class SnapshotterModule implements ModuleInterface
17
{
18
    /**
19
     * @param RegistratorInterface $registrator
20
     */
21
    public function register(RegistratorInterface $registrator)
22
    {
23
        //Register tokenizer directory
24
        $registrator->configure('tokenizer', 'directories', 'spiral/snapshotter', [
25
            "directory('libraries') . 'spiral/snapshotter/source/Snapshotter/',",
26
        ]);
27
28
        //Register view namespace
29
        $registrator->configure('views', 'namespaces', 'spiral/snapshotter', [
30
            "'snapshotter' => [",
31
            "   directory('libraries') . 'spiral/snapshotter/source/views/',",
32
            "   /*{{namespaces.snapshotter}}*/",
33
            "],"
34
        ]);
35
36
        //Register database settings
37
        $registrator->configure('databases', 'aliases', 'spiral/snapshotter', [
38
            "'snapshots' => 'default',"
39
        ]);
40
41
        //Register controller in navigation config
42
        $registrator->configure('modules/vault', 'controllers', 'spiral/snapshotter', [
43
            "'snapshots' => \\Spiral\\Snapshotter\\AbstractController::class,",
44
        ]);
45
    }
46
47
    /**
48
     * @param PublisherInterface   $publisher
49
     * @param DirectoriesInterface $directories
50
     */
51
    public function publish(PublisherInterface $publisher, DirectoriesInterface $directories)
52
    {
53
    }
54
}