Test Setup Failed
Push — master ( 5548b8...63dc2d )
by Stefan
16:44
created

DeviceRedirectDev::writeDeviceInfo()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 * *****************************************************************************
4
 * Contributions to this work were made on behalf of the GÉANT project, a 
5
 * project that has received funding from the European Union’s Framework 
6
 * Programme 7 under Grant Agreements No. 238875 (GN3) and No. 605243 (GN3plus),
7
 * Horizon 2020 research and innovation programme under Grant Agreements No. 
8
 * 691567 (GN4-1) and No. 731122 (GN4-2).
9
 * On behalf of the aforementioned projects, GEANT Association is the sole owner
10
 * of the copyright in all material which was developed by a member of the GÉANT
11
 * project. GÉANT Vereniging (Association) is registered with the Chamber of 
12
 * Commerce in Amsterdam with registration number 40535155 and operates in the 
13
 * UK as a branch of GÉANT Vereniging.
14
 * 
15
 * Registered office: Hoekenrode 3, 1102BR Amsterdam, The Netherlands. 
16
 * UK branch address: City House, 126-130 Hills Road, Cambridge CB2 1PQ, UK
17
 *
18
 * License: see the web/copyright.inc.php file in the file structure or
19
 *          <base_url>/copyright.php after deploying the software
20
 */
21
22
namespace devices\redirect_dev;
23
24
class DeviceRedirectDev extends \core\DeviceConfig {
25
   /**
26
    * Constructs a Device object.
27
    *
28
    * @final not to be redefined
29
    */
30
    final public function __construct() {
31
        parent::__construct();
32
      $this->setSupportedEapMethods([\core\common\EAP::EAPTYPE_NONE]);
33
      $this->loggerInstance->debug(4,"RedirectEx called");
34
    }
35
    
36
    /**
37
     * Write to the user that we can't do anything here, except for redirecting.
38
     * 
39
     * @return string
40
     */
41
    public function writeDeviceInfo() {
42
        \core\common\Entity::intoThePotatoes();
43
        $out = "<p>";
44
        $out .= _("This device is not yet supported by CAT, but your local administrator created a redirect to local installation instructions.");
45
        \core\common\Entity::outOfThePotatoes();
46
        return $out;
47
    }
48
49
    /**
50
     * Nothing to see here. Please move along.
51
     * 
52
     * @return void
53
     */
54
    public function writeInstaller() {
55
        // we aren't actually doing anything, but have to implement the method
56
        // from abstract class DeviceConfig
57
        return;
58
    }
59
60
}
61