Skip to content

Commit b2a295f

Browse files
author
James Taylor
committed
New struct for get
1 parent 5d82a2c commit b2a295f

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
namespace PleskX\Api\Struct\Mail;
4+
5+
use PleskX\Api\XmlResponse;
6+
7+
class Forwards extends \PleskX\Api\Struct
8+
{
9+
/** @var integer */
10+
public $id;
11+
12+
/** @var string */
13+
public $name;
14+
15+
/** @var string */
16+
public $address;
17+
18+
/**
19+
* @param XmlResponse $apiResponse
20+
* @throws \Exception
21+
*/
22+
public function __construct(XMLResponse $apiResponse)
23+
{
24+
$line = new \stdClass();
25+
$line->id = $apiResponse->id;
26+
$line->name = $apiResponse->name;
27+
$line->address = $apiResponse->forwarding->address;
28+
29+
$this->_initScalarProperties($line, [
30+
'id',
31+
'name',
32+
'address',
33+
]);
34+
}
35+
}

0 commit comments

Comments
 (0)