1: <?php
2:
3: namespace Saklient\Cloud\Resources;
4:
5: require_once __DIR__ . "/../../../Saklient/Util.php";
6: use \Saklient\Util;
7: require_once __DIR__ . "/../../../Saklient/Errors/SaklientException.php";
8: use \Saklient\Errors\SaklientException;
9:
10: /**
11: * FTPサーバのアカウント情報。
12: *
13: * @property-read string $hostName ホスト名
14: * @property-read string $user ユーザ名
15: * @property-read string $password パスワード
16: */
17: class FtpInfo {
18:
19: /**
20: * @private
21: * @access protected
22: * @ignore
23: * @var string
24: */
25: protected $_hostName;
26:
27: /**
28: * @access public
29: * @ignore
30: * @return string
31: */
32: public function get_hostName()
33: {
34: return $this->_hostName;
35: }
36:
37:
38:
39: /**
40: * @private
41: * @access protected
42: * @ignore
43: * @var string
44: */
45: protected $_user;
46:
47: /**
48: * @access public
49: * @ignore
50: * @return string
51: */
52: public function get_user()
53: {
54: return $this->_user;
55: }
56:
57:
58:
59: /**
60: * @private
61: * @access protected
62: * @ignore
63: * @var string
64: */
65: protected $_password;
66:
67: /**
68: * @access public
69: * @ignore
70: * @return string
71: */
72: public function get_password()
73: {
74: return $this->_password;
75: }
76:
77:
78:
79: /**
80: * @ignore
81: * @access public
82: * @param mixed $obj
83: */
84: public function __construct($obj)
85: {
86: Util::validateArgCount(func_num_args(), 1);
87: $this->_hostName = $obj->{"HostName"};
88: $this->_user = $obj->{"User"};
89: $this->_password = $obj->{"Password"};
90: }
91:
92: /**
93: * @ignore
94: */
95: public function __get($key) {
96: switch ($key) {
97: case "hostName": return $this->get_hostName();
98: case "user": return $this->get_user();
99: case "password": return $this->get_password();
100: default: return null;
101: }
102: }
103:
104: }
105:
106: