PEAR2_SimpleChannelServer-0.2.0 › PEAR2_SimpleChannelServer-0.2.0/php/PEAR2/Pyrus/PackageFile/v2/Release/ConfigureOption.php
- PEAR2_SimpleChannelServer-0.2.0/
- customcommand/
- pear2.php.net/
- PEAR2_Pyrus_Developer/
- PEAR2_SimpleChannelServer/
- pear2.php.net/
- data/
- pear2.php.net/
- PEAR2_Pyrus/
- built-in-commands.xml
- channel-1.0.xsd
- customcommand-2.0.xsd
- customrole-2.0.xsd
- customtask-2.0.xsd
- default_channels/
- developercommands.xml
- package-2.0.xsd
- package-2.1.xsd
- scscommands.xml
- x509rootcerts/
- AAACertificateServices
- ABA.ECOMRootCA
- AOLTimeWarnerRootCertificationAuthority1
- AOLTimeWarnerRootCertificationAuthority2
- AddTrustClass1CARoot
- AddTrustExternalCARoot
- AddTrustPublicCARoot
- AddTrustQualifiedCARoot
- AmericaOnlineRootCertificationAuthority1
- AmericaOnlineRootCertificationAuthority2
- AutoridaddeCertificacionFirmaprofesionalCIFA62634068
- BaltimoreCyberTrustRoot
- CACertSigningAuthority
- COMODOCertificationAuthority
- CertumCA
- ChambersofCommerceRoot
- Class2PrimaryCA
- DSTACESCAX6
- DSTRootCAX1
- DSTRootCAX2
- DSTRootCAX3
- DigiCertAssuredIDRootCA
- DigiCertGlobalRootCA
- DigiCertHighAssuranceEVRootCA
- DigiNotarRootCA
- DigitalSignatureTrustCo.GlobalCA1
- DigitalSignatureTrustCo.GlobalCA3
- Entrust.netCertificationAuthority(2048)
- Entrust.netClientCertificationAuthority
- Entrust.netClientCertificationAuthority2
- Entrust.netSecureServerCertificationAuthority
- Entrust.netSecureServerCertificationAuthority2
- EntrustRootCertificationAuthority
- EquifaxSecureCA
- EquifaxSecureGlobaleBusinessCA-1
- EquifaxSecureeBusinessCA-1
- EquifaxSecureeBusinessCA2
- FreeSSLCertificationAuthority
- GPRoot2
- GTECyberTrustGlobalRoot
- GTECyberTrustRoot
- GeoTrustGlobalCA
- GeoTrustGlobalCA2
- GeoTrustPrimaryCertificationAuthority
- GeoTrustUniversalCA
- GeoTrustUniversalCA2
- GlobalChambersignRoot
- GlobalSign
- GlobalSign2
- GlobalSignExtendedValidationCA
- GlobalSignRootCA
- GoDaddyClass2CA
- GoDaddySecureCertificationAuthority
- IPSCACLASE1CertificationAuthority
- IPSCACLASE3CertificationAuthority
- IPSCACLASEA1CertificationAuthority
- IPSCACLASEA3CertificationAuthority
- IPSCAChainedCAsCertificationAuthority
- IPSCATimestampingCertificationAuthority
- IPSSERVIDORES
- NetLockExpressz(ClassC)Tanusitvanykiado
- NetLockKozjegyzoi(ClassA)Tanusitvanykiado
- NetLockMinositettKozjegyzoi(ClassQA)Tanusitvanykiado
- NetLockUzleti(ClassB)Tanusitvanykiado
- NetworkSolutionsCertificateAuthority
- QuoVadisRootCA2
- QuoVadisRootCA3
- QuoVadisRootCertificationAuthority
- RSASecurity1024v3
- RSASecurity2048v3
- SecureCertificateServices
- SecureGlobalCA
- SecureTrustCA
- SecurityCommunicationRootCA
- SoneraClass1CA
- SoneraClass2CA
- StaatderNederlandenRootCA
- StarfieldClass2CA
- StartComCertificationAuthority
- SwissSignGoldCA-G2
- SwissSignPlatinumCA-G2
- SwissSignSilverCA-G2
- SwisscomRootCA1
- TCTrustCenter,Germany,Class2CA
- TCTrustCenter,Germany,Class3CA
- TDCInternetRootCA
- TDCOCESCA
- TURKTRUST
- TURKTRUST2
- TaiwanGRCA
- ThawtePersonalBasicCA
- ThawtePersonalFreemailCA
- ThawtePersonalPremiumCA
- ThawtePremiumServerCA
- ThawteSGCCA
- ThawteServerCA
- ThawteTimestampingCA
- TrustedCertificateServices
- UTN-DATACorpSGC
- UTN-USERFirst-ClientAuthenticationandEmail
- UTN-USERFirst-Hardware
- UTN-USERFirst-NetworkApplications
- UTN-USERFirst-Object
- VeriSignClass1PublicPrimaryCertificationAuthority-G3
- VeriSignClass2PublicPrimaryCertificationAuthority-G3
- VeriSignClass3PublicPrimaryCertificationAuthority-G3
- VeriSignClass3PublicPrimaryCertificationAuthority-G5
- VeriSignClass4PublicPrimaryCertificationAuthority-G3
- VeriSignTimeStampingAuthorityCA
- Verisign-RSASecureServerCA
- VerisignClass1PublicPrimaryCertificationAuthority
- VerisignClass1PublicPrimaryCertificationAuthority-G2
- VerisignClass2PublicPrimaryCertificationAuthority
- VerisignClass2PublicPrimaryCertificationAuthority-G2
- VerisignClass3PublicPrimaryCertificationAuthority
- VerisignClass3PublicPrimaryCertificationAuthority-G2
- VerisignClass4PublicPrimaryCertificationAuthority-G2
- VisaeCommerceRoot
- WellsFargoRootCertificateAuthority
- XRampGlobalCertificationAuthority
- beTRUSTedRootCA
- beTRUSTedRootCA-BaltimoreImplementation
- beTRUSTedRootCA-EntrustImplementation
- beTRUSTedRootCA-RSAImplementation
- blah.php
- thawtePrimaryRootCA
- valicert.com
- valicert.com2
- valicert.com3
- PEAR2_Pyrus_Developer/
- PEAR2_Pyrus/
- pear2.php.net/
- doc/
- pear2.php.net/
- PEAR2_HTTP_Request/
- examples/
- examples/
- examples/
- PEAR2_SimpleChannelServer/
- examples/
- PEAR2_HTTP_Request/
- pear2.php.net/
- php/
- PEAR2/
- Autoload.php
- Exception.php
- HTTP/
- MultiErrors/
- MultiErrors.php
- Pyrus/
- AtomicFileTransaction/
- AtomicFileTransaction.php
- Channel/
- Channel.php
- ChannelFile/
- Exception.php
- Parser/
- v1/
- Mirror.php
- Servers/
- Protocols/
- Protocols.php
- Servers.php
- v1.php
- ChannelFile.php
- ChannelFileInterface.php
- ChannelInterface.php
- ChannelRegistry/
- ChannelRegistry.php
- ChannelRegistryInterface.php
- Config/
- Config.php
- DER/
- BMPString.php
- BitString.php
- Boolean.php
- Choice.php
- Constructed.php
- Enumerated.php
- Exception.php
- External.php
- GeneralizedTime.php
- IA5String.php
- Integer.php
- Null.php
- NumericString.php
- OCSPRequest.php
- ObjectIdentifier.php
- OctetString.php
- Parser.php
- PrintableString.php
- Schema.php
- SchemaChoice.php
- Sequence.php
- Set.php
- String.php
- UTCTime.php
- UTF8String.php
- UniversalString.php
- VisibleString.php
- DER.php
- Dependency/
- Developer/
- CoverageAnalyzer/
- Creator/
- PackageFile/
- Runphpt/
- DirectedGraph/
- DirectedGraph.php
- DownloadProgressListener.php
- Exception.php
- FileTransactionInterface.php
- FileTransactions.php
- Filesystem.php
- HTTPException.php
- IOException.php
- Installer/
- Installer.php
- LogInterface.php
- Logger.php
- Main.php
- OSGuess.php
- PECLBuild/
- PECLBuild.php
- Package/
- Package.php
- PackageFile/
- Exception.php
- Parser/
- ValidatorInterface.php
- v2/
- BundledPackage.php
- Compatible/
- Compatible.php
- Configureoption/
- Configureoption.php
- Dependencies/
- Dependencies.php
- Developer/
- Developer.php
- Files/
- Files.php
- License/
- License.php
- Release/
- Release.php
- SimpleProperty.php
- UsesRoleTask/
- UsesRoleTask.php
- Validator.php
- v2.php
- v2Iterator/
- PackageFile.php
- PackageFileInterface.php
- PackageInterface.php
- PluginRegistry/
- PluginRegistry.php
- REST/
- REST.php
- Registry/
- Registry.php
- RegistryInterface.php
- ScriptFrontend/
- ScriptFrontend.php
- ScriptRunner.php
- Task/
- Uninstaller/
- Uninstaller.php
- Validate/
- Validate.php
- Validator/
- XMLParser/
- XMLParser.php
- XMLWriter/
- XMLWriter.php
- SimpleChannelServer/
- PEAR2/
- script/
- test/
- pear2.php.net/
- PEAR2_HTTP_Request/
- _setup.php
- get_large_file.phpt
- headers.001.phpt
- headers.002.phpt
- headers.003.phpt
- headers.004.phpt
- http/
- phpsocket/
- phpstream/
- shared/
- testFiles/
- PEAR2_HTTP_Request/
- pear2.php.net/
- www/
- pear2.php.net/
- PEAR2_Pyrus_Developer/
- pear2.php.net/
- customcommand/
- package.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?php
namespace PEAR2\Pyrus\PackageFile\v2\Release;
class ConfigureOption implements \ArrayAccess, \Iterator, \Countable
{
protected $parent;
protected $info;
protected $index;
function __construct($parent, array $info, $index = null)
{
$this->parent = $parent;
$this->info = $info;
$this->index = $index;
}
function current()
{
$info = current($this->info);
foreach (array('name', 'default', 'prompt') as $key) {
if (!array_key_exists($key, $info)) {
$info[$key] = null;
}
}
return new ConfigureOption($this, $info, key($this->info));
}
function count()
{
return count($this->info);
}
function rewind()
{
reset($this->info);
}
function key()
{
$info = current($this->info);
return $info['name'];
}
function next()
{
return next($this->info);
}
function valid()
{
return current($this->info);
}
function locateConfigureOption($name)
{
foreach ($this->info as $i => $dep) {
if (isset($dep['name']) && $dep['name'] == $name) {
return $i;
}
}
return false;
}
function offsetGet($var)
{
if ($this->index !== null) {
throw new Exception('use -> operator to access properties of a configureoption');
}
$i = $this->locateConfigureOption($var);
if (false === $i) {
$i = count($this->info);
$info = array('name' => $var, 'default' => null, 'prompt' => null);
} else {
$info = $this->info[$i];
foreach (array('name', 'default', 'prompt') as $key) {
if (!array_key_exists($key, $this->info[$i])) {
$info[$key] = null;
}
}
}
return new ConfigureOption($this, $info, $i);
}
function offsetSet($var, $value)
{
if ($this->index !== null) {
throw new Exception('use -> operator to access properties of a configureoption');
}
if (!($value instanceof ConfigureOption)) {
throw new Exception(
'Can only set configureoption to a \PEAR2\Pyrus\PackageFile\v2\Release\ConfigureOption object');
}
if ($var !== null && $var !== $value->name) {
throw new Exception('use [] or [\'' . $value->name . '\'] to set this configureoption');
}
$i = $this->locateConfigureOption($var);
if (false === $i) {
$i = count($this->info);
}
$this->info[$i] = array('name' => $value->name,
'default' => $value->default,
'prompt' => $value->prompt);
$this->save();
}
function offsetExists($var)
{
if ($this->index !== null) {
throw new Exception('use -> operator to access properties of a configureoption');
}
$i = $this->locateConfigureOption($var);
return $i !== false;
}
function offsetUnset($var)
{
if ($this->index !== null) {
throw new Exception('use -> operator to access properties of a configureoption');
}
$i = $this->locateConfigureOption($var);
if ($i === false) {
return;
}
unset($this->info[$i]);
$this->info = array_values($this->info);
$this->save();
}
function __unset($var)
{
if ($this->index === null) {
throw new Exception('use [] operator to access configureoptions');
}
if (!array_key_exists($var, $this->info)) {
throw new Exception('Unknown variable ' . $var . ', must be one of ' .
implode(', ', array_keys($this->info)));
}
$this->info[$var] = null;
$this->save();
}
function __isset($var)
{
if ($this->index === null) {
throw new Exception('use [] operator to access configureoptions');
}
if (!array_key_exists($var, $this->info)) {
throw new Exception('Unknown variable ' . $var . ', must be one of ' .
implode(', ', array_keys($this->info)));
}
return isset($this->info[$var]);
}
function __set($var, $value)
{
return $this->__call($var, array($value));
}
function __call($var, $args)
{
if ($this->index === null) {
throw new Exception('use [] operator to access configureoptions');
}
if (!array_key_exists($var, $this->info)) {
throw new Exception('Unknown variable ' . $var . ', must be one of ' .
implode(', ', array_keys($this->info)));
}
if ($args[0] === null) {
$this->info[$var] = null;
$this->save();
return $this;
}
$this->info[$var] = $args[0];
$this->save();
return $this;
}
function __get($var)
{
if ($this->index === null) {
throw new Exception('use [] operator to access configureoptions');
}
if (!array_key_exists($var, $this->info)) {
throw new Exception('Unknown variable ' . $var . ', must be one of ' .
implode(', ', array_keys($this->info)));
}
if (!isset($this->info[$var])) {
return null;
}
return $this->info[$var];
}
function getInfo()
{
return $this->info;
}
function setInfo($info, $index)
{
foreach (array_keys($info) as $key) {
if ($info[$key] === null) {
unset($info[$key]);
}
}
$this->info[$index] = $info;
}
function save()
{
if ($this->parent instanceof self) {
$this->parent->setInfo($this->info, $this->index);
$this->parent->save();
return;
}
$info = $this->info;
if (count($info) == 1) {
$info = $info[0];
}
$this->parent->setConfigureOption($info);
$this->parent->save();
}
}EOF
