Skip to content

Commit 3867b18

Browse files
Add comments
1 parent 0e9dc34 commit 3867b18

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/Config/Application.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
namespace Pavlusha311245\UnitPhpSdk\Config;
44

5+
/**
6+
* Application class
7+
*/
58
class Application
69
{
710
private string $_type;
@@ -44,26 +47,40 @@ public function __construct($applicationName, $applicationData)
4447
}
4548

4649
/**
50+
* Get application arguments
51+
*
4752
* @return array
4853
*/
4954
public function getArguments(): array
5055
{
5156
return array_values($this->_arguments);
5257
}
5358

59+
/**
60+
* Get application type
61+
*
62+
* @return string
63+
*/
5464
public function getType(): string
5565
{
5666
return $this->_type;
5767
}
5868

5969
/**
70+
* Set application listener
71+
*
6072
* @param mixed $listener
6173
*/
6274
public function setListener(Listener $listener): void
6375
{
6476
$this->_listeners[$listener->getListener()] = $listener;
6577
}
6678

79+
/**
80+
* Return listener
81+
*
82+
* @return array
83+
*/
6784
public function getListeners(): array
6885
{
6986
return $this->_listeners;
@@ -82,11 +99,21 @@ public function getData()
8299
return $this->_data;
83100
}
84101

102+
/**
103+
* Get user
104+
*
105+
* @return string
106+
*/
85107
public function getUser(): string
86108
{
87109
return $this->_user;
88110
}
89111

112+
/**
113+
* Get group
114+
*
115+
* @return string
116+
*/
90117
public function getGroup(): string
91118
{
92119
return $this->_group;

src/Config/Route.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ public function __construct(
2020
}
2121

2222
/**
23+
* Return Listener
24+
*
2325
* @param mixed $listener
2426
*/
2527
public function setListener(Listener $listener): void
@@ -33,13 +35,20 @@ public function getListeners(): array
3335
}
3436

3537
/**
38+
* Get name
39+
*
3640
* @return mixed
3741
*/
3842
public function getName()
3943
{
4044
return $this->_name;
4145
}
4246

47+
/**
48+
* Return RouteBlock (action, match)
49+
*
50+
* @return array
51+
*/
4352
public function getRouteBlocks(): array
4453
{
4554
return $this->_routeBlocks;

0 commit comments

Comments
 (0)