Passed
Push — master ( 2aef24...cbfe11 )
by Jean-Christophe
13:11
created

Semantic::getInverted()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 2
rs 10
1
<?php
2
3
namespace Ajax;
4
5
use Ajax\common\BaseGui;
6
use Ajax\semantic\traits\SemanticComponentsTrait;
7
use Ajax\semantic\traits\SemanticHtmlElementsTrait;
8
use Ajax\semantic\traits\SemanticHtmlCollectionsTrait;
9
use Ajax\semantic\traits\SemanticHtmlModulesTrait;
10
use Ajax\semantic\traits\SemanticHtmlViewsTrait;
11
use Ajax\semantic\traits\SemanticWidgetsTrait;
12
13
class Semantic extends BaseGui {
14
    use SemanticComponentsTrait,SemanticHtmlElementsTrait,SemanticHtmlCollectionsTrait,
15
        SemanticHtmlModulesTrait,SemanticHtmlViewsTrait,SemanticWidgetsTrait;
16
17
    private $language;
18
19
    public function __construct($autoCompile=true) {
20
        parent::__construct($autoCompile);
21
    }
22
23
    public function setLanguage($language){
24
        if($language!==$this->language){
25
            $file=\realpath(dirname(__FILE__)."/semantic/components/validation/languages/".$language.".js");
26
            if(\file_exists($file)){
27
                $script=\file_get_contents($file);
28
                $this->js->exec($script,true);
29
                $this->language=$language;
30
            }
31
        }
32
    }
33
}
34