Subversion-Projekte lars-tiefland.laravel_shop

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
148 lars 1
<?php
2
 
3
/**
4
 * This file is part of the Carbon package.
5
 *
6
 * (c) Brian Nesbitt <brian@nesbot.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
 
12
namespace Carbon\Exceptions;
13
 
14
use Throwable;
15
 
16
class UnitNotConfiguredException extends UnitException
17
{
18
    /**
19
     * The unit.
20
     *
21
     * @var string
22
     */
23
    protected $unit;
24
 
25
    /**
26
     * Constructor.
27
     *
28
     * @param string         $unit
29
     * @param int            $code
30
     * @param Throwable|null $previous
31
     */
32
    public function __construct($unit, $code = 0, Throwable $previous = null)
33
    {
34
        $this->unit = $unit;
35
 
36
        parent::__construct("Unit $unit have no configuration to get total from other units.", $code, $previous);
37
    }
38
 
39
    /**
40
     * Get the unit.
41
     *
42
     * @return string
43
     */
44
    public function getUnit(): string
45
    {
46
        return $this->unit;
47
    }
48
}