Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit b2fa571

Browse files
committed
Added new models
* Added new models for Resource and Member
1 parent 892c8b6 commit b2fa571

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ All notable changes to this project will be documented in this file.
66
- Added badges to README
77
- Added new property to Facility model: description
88
- Added page with configurable table of SPs on Proxy
9+
- Added new model Member
10+
- Added new model Resource
911

1012
[Changed]
1113
- Connectors methods are not static for now.

lib/model/Member.php

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
3+
/**
4+
* @author Pavel Vyskocil <[email protected]>
5+
*/
6+
class sspmod_perun_model_Member implements sspmod_perun_model_HasId
7+
{
8+
const VALID = 'VALID';
9+
const INVALID = 'INVALID';
10+
const EXPIRED = 'EXPIRED';
11+
const SUSPENDED = 'SUSPENDED';
12+
const DISABLED = 'DISABLED';
13+
14+
private $id;
15+
private $voId;
16+
private $status;
17+
18+
/**
19+
* sspmod_perun_model_Member constructor.
20+
* @param $id
21+
* @param $voId
22+
* @param $status
23+
*/
24+
public function __construct($id, $voId, $status)
25+
{
26+
$this->id = $id;
27+
$this->voId = $voId;
28+
$this->status = $status;
29+
}
30+
31+
/**
32+
* @return int
33+
*/
34+
public function getId()
35+
{
36+
return $this->id;
37+
}
38+
39+
/**
40+
* @return int
41+
*/
42+
public function getVoId()
43+
{
44+
return $this->voId;
45+
}
46+
47+
/**
48+
* @return string
49+
*/
50+
public function getStatus()
51+
{
52+
return $this->status;
53+
}
54+
55+
}

lib/model/Resource.php

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
<?php
2+
3+
/**
4+
* @author Pavel Vyskocil <[email protected]>
5+
*/
6+
class sspmod_perun_model_Resource implements sspmod_perun_model_HasId
7+
{
8+
private $id;
9+
private $voId;
10+
private $facilityId;
11+
private $name;
12+
13+
/**
14+
* sspmod_perun_model_Resource constructor.
15+
* @param $id
16+
* @param $voId
17+
* @param $facilityId
18+
* @param $name
19+
*/
20+
public function __construct($id, $voId, $facilityId, $name)
21+
{
22+
$this->id = $id;
23+
$this->voId = $voId;
24+
$this->facilityId = $facilityId;
25+
$this->name = $name;
26+
}
27+
28+
/**
29+
* @return int
30+
*/
31+
public function getId()
32+
{
33+
return $this->id;
34+
}
35+
36+
/**
37+
* @return int
38+
*/
39+
public function getVoId()
40+
{
41+
return $this->voId;
42+
}
43+
44+
/**
45+
* @return int
46+
*/
47+
public function getFacilityId()
48+
{
49+
return $this->facilityId;
50+
}
51+
52+
/**
53+
* @return string
54+
*/
55+
public function getName()
56+
{
57+
return $this->name;
58+
}
59+
60+
}

0 commit comments

Comments
 (0)