Completed
Push — master ( 21ef4f...df9e52 )
by Alex
04:31
created

ControllerInterface   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 3
c 0
b 0
f 0
dl 0
loc 31
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setControllerName() 0 3 1
A getControllerName() 0 3 1
1
<?php
2
namespace Mezon\Application;
3
4
/**
5
 * Interface ControllerInterface
6
 *
7
 * @package Application
8
 * @subpackage ControllerInterface
9
 * @author Dodonov A.A.
10
 * @version v.1.0 (2020/01/12)
11
 * @copyright Copyright (c) 2020, aeon.org
12
 */
13
14
/**
15
 * Base interface for all controllers
16
 * 
17
 * @deprecated since 2020-06-26
18
 */
19
abstract class ControllerInterface extends AbstractPresenter
20
{
21
22
    /**
23
     * Method runs controller
24
     *
25
     * @param string $controllerName
26
     *            Controller name to be run
27
     * @return mixed Controller execution result
28
     */
29
    abstract public function run(string $controllerName = '');
30
31
    /**
32
     * Method returns controller's name
33
     *
34
     * @return string controller's name
35
     */
36
    public function getControllerName(): string
37
    {
38
        return $this->getPresenterName();
39
    }
40
41
    /**
42
     * Method sets controller's name
43
     *
44
     * @param string $controllerName
45
     *            controller's name
46
     */
47
    public function setControllerName(string $controllerName): void
48
    {
49
        $this->setPresenterName($controllerName);
50
    }
51
}
52