Completed
Branch 4.0 (c710b5)
by Serhii
02:04
created

StorageException::setDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * @author Serhii Nekhaienko <[email protected]>
4
 * @license GPL
5
 * @copyright Serhii Nekhaienko &copy 2018
6
 * @version 4.0.0
7
 * @project browser-detector
8
 */
9
10
namespace EndorphinStudio\Detector\Exception;
11
12
class StorageException extends \Exception
13
{
14
    /**
15
     * Message for exception
16
     */
17
    const DIRECTORY_NOT_FOUND = '%s is not directory or not exists';
18
19
    /**
20
     * @var string Path to directory
21
     */
22
    private $directory;
23
24
    /**
25
     * @var string Classname of Storage Provider
26
     */
27
    private $provider;
28
29
    /**
30
     * Get path to directory which Storage Provider try to load
31
     * @return string Path to directory
32
     */
33
    public function getDirectory(): string
34
    {
35
        return $this->directory;
36
    }
37
38
    /**
39
     * Set path to directory which Storage Provider try to load
40
     * @param string $directory Path to directory
41
     */
42
    public function setDirectory(string $directory)
43
    {
44
        $this->directory = $directory;
45
    }
46
47
    /**
48
     * Get classname of Storage provider
49
     * @return string Classname of Storage Provider
50
     */
51
    public function getProvider(): string
52
    {
53
        return $this->provider;
54
    }
55
56
    /**
57
     * Set classname of Storage Provider
58
     * @param string $provider Classname of Storage Provider
59
     */
60
    public function setProvider(string $provider)
61
    {
62
        $this->provider = $provider;
63
    }
64
}