Completed
Push — master ( ab4f53...e0a3aa )
by Vitaly
03:11
created

View::src()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
/**
3
 * Created by Vitaly Iegorov <[email protected]>.
4
 * on 22.02.16 at 14:04
5
 */
6
namespace samsonphp\view;
7
8
use samsonframework\core\SystemInterface;
9
10
/**
11
 * SamsonPHP View class.
12
 *
13
 * @package samsonphp\view
14
 */
15
class View extends \samsonframework\view\View
16
{
17
    /** @var SystemInterface Pointer to system interface */
18
    public static $system;
19
20
    /**
21
     * Generate url for resource path that is not accessible by web-server.
22
     *
23
     * @param string       $path Path to resource
24
     * @param string $controller Url to controller for handling resource serving
25
     * @return string Url for resource serving
26
     */
27
    public function src($path, $controller = '/view/')
28
    {
29
        return $controller.'?p='.$path;
30
    }
31
}
32