StorageException::setProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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 endorphin-studio/browser-detector
8
 */
9
10
namespace EndorphinStudio\Detector\Exception;
11
12
/**
13
 * Exception for Storage
14
 * Class StorageException
15
 * @package EndorphinStudio\Detector\Exception
16
 */
17
class StorageException extends \Exception
18
{
19
    /**
20
     * Message for exception
21
     */
22
    const DIRECTORY_NOT_FOUND = '%s is not directory or not exists';
23
24
    /**
25
     * @var string Path to directory
26
     */
27
    private $directory;
28
29
    /**
30
     * @var string Classname of Storage Provider
31
     */
32
    private $provider;
33
34
    /**
35
     * Get path to directory which Storage Provider try to load
36
     * @return string Path to directory
37
     */
38
    public function getDirectory(): string
39
    {
40
        return $this->directory;
41
    }
42
43
    /**
44
     * Set path to directory which Storage Provider try to load
45
     * @param string $directory Path to directory
46
     */
47
    public function setDirectory(string $directory)
48
    {
49
        $this->directory = $directory;
50
    }
51
52
    /**
53
     * Get classname of Storage provider
54
     * @return string Classname of Storage Provider
55
     */
56
    public function getProvider(): string
57
    {
58
        return $this->provider;
59
    }
60
61
    /**
62
     * Set classname of Storage Provider
63
     * @param string $provider Classname of Storage Provider
64
     */
65
    public function setProvider(string $provider)
66
    {
67
        $this->provider = $provider;
68
    }
69
}