Completed
Push — master ( 391d5f...dcdeac )
by Arman
19s queued 16s
created

ViewException::fileNotFound()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php
2
3
/**
4
 * Quantum PHP Framework
5
 *
6
 * An open source software development framework for PHP
7
 *
8
 * @package Quantum
9
 * @author Arman Ag. <[email protected]>
10
 * @copyright Copyright (c) 2018 Softberg LLC (https://softberg.org)
11
 * @link http://quantum.softberg.org/
12
 * @since 2.9.5
13
 */
14
15
namespace Quantum\Exceptions;
16
17
/**
18
 * Class ViewException
19
 * @package Quantum\Exceptions
20
 */
21
class ViewException extends AppException
22
{
23
    /**
24
     * @param string $name
25
     * @return ViewException
26
     */
27
    public static function directInstantiation(string $name): ViewException
28
    {
29
        return new static(t('exception.direct_view_instance', $name), E_WARNING);
30
    }
31
32
    /**
33
     * @return ViewException
34
     */
35
    public static function noLayoutSet(): ViewException
36
    {
37
        return new static(t('exception.layout_not_set'), E_ERROR);
38
    }
39
40
    /**
41
     * @return ViewException
42
     */
43
    public static function missingTemplateEngineConfigs(): ViewException
44
    {
45
        return new static(t('exception.template_engine_config_missing'), E_WARNING);
46
    }
47
48
}
49