Completed
Push — master ( 26081f...c5e2b8 )
by Alberto
14s queued 11s
created

AssetHelper::initialize()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 1
dl 0
loc 8
rs 10
1
<?php
2
/**
3
 * BEdita, API-first content management framework
4
 * Copyright 2019 ChannelWeb Srl, Chialab Srl
5
 *
6
 * This file is part of BEdita: you can redistribute it and/or modify
7
 * it under the terms of the GNU Lesser General Public License as published
8
 * by the Free Software Foundation, either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * See LICENSE.LGPL or <http://gnu.org/licenses/lgpl-3.0.html> for more details.
12
 */
13
14
namespace BEdita\WebTools\View\Helper;
15
16
use BEdita\WebTools\Utility\AssetsRevisions;
17
use Cake\View\Helper;
18
19
/**
20
 * Asset Helper to handle asset names with signatures.
21
 *
22
 * @see AssetsRevisions for details
23
 */
24
class AssetHelper extends Helper
25
{
26
    /**
27
     * Retrieve `revved` asset name if found in manifest or return canonical asset name otherwise
28
     *
29
     * @param string $name Canonical asset name (un-revved)
30
     * @return string
31
     * @deprecated Deprecated since 1.3.0 Use `AssetsRevisions::get` or `Html` helper methods `script` or `css` directly.
32
     */
33
    public function get(string $name): string
34
    {
35
        return AssetsRevisions::get($name);
36
    }
37
}
38