Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitafd02ff

Browse files
committed
Allow adding and removing values to/from multi-valued attributes
1 parent3086d0e commitafd02ff

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

‎src/Symfony/Component/Ldap/Adapter/ExtLdap/EntryManager.php‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,14 @@ public function remove(Entry $entry)
7070
/**
7171
* Adds values to an entry's multi-valued attribute from the Ldap server.
7272
*
73-
* @param Entry $entry
74-
* @param $attribute
75-
* @param $values
73+
* @param Entry$entry
74+
* @paramstring$attribute
75+
* @paramarray$values
7676
*
7777
* @throws NotBoundException
7878
* @throws LdapException
7979
*/
80-
publicfunctionaddValues(Entry$entry,$attribute,$values)
80+
publicfunctionaddAttributeValues(Entry$entry,string$attribute,array$values)
8181
{
8282
$con =$this->getConnectionResource();
8383

@@ -90,14 +90,14 @@ public function addValues(Entry $entry, $attribute, $values)
9090
/**
9191
* Removes values from an entry's multi-valued attribute from the Ldap server.
9292
*
93-
* @param Entry $entry
94-
* @param $attribute
95-
* @param $values
93+
* @param Entry$entry
94+
* @paramstring$attribute
95+
* @paramarray$values
9696
*
9797
* @throws NotBoundException
9898
* @throws LdapException
9999
*/
100-
publicfunctionremoveValues(Entry$entry,$attribute,$values)
100+
publicfunctionremoveAttributeValues(Entry$entry,string$attribute,array$values)
101101
{
102102
$con =$this->getConnectionResource();
103103

‎src/Symfony/Component/Ldap/Tests/Adapter/ExtLdap/LdapManagerTest.php‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,29 +193,29 @@ public function testLdapRenameWithoutRemovingOldRdn()
193193
$this->executeSearchQuery(1);
194194
}
195195

196-
publicfunctiontestLdapAddRemoveValues()
196+
publicfunctiontestLdapAddRemoveAttributeValues()
197197
{
198198
$entryManager =$this->adapter->getEntryManager();
199199

200200
$result =$this->executeSearchQuery(1);
201201
$entry =$result[0];
202202

203-
$entryManager->addValues($entry,'mail',array('fabpot@example.org','fabpot2@example.org'));
203+
$entryManager->addAttributeValues($entry,'mail',array('fabpot@example.org','fabpot2@example.org'));
204204

205205
$result =$this->executeSearchQuery(1);
206206
$newEntry =$result[0];
207207

208208
$this->assertCount(4,$newEntry->getAttribute('mail'));
209209

210-
$entryManager->removeValues($newEntry,'mail',array('fabpot@example.org','fabpot2@example.org'));
210+
$entryManager->removeAttributeValues($newEntry,'mail',array('fabpot@example.org','fabpot2@example.org'));
211211

212212
$result =$this->executeSearchQuery(1);
213213
$newNewEntry =$result[0];
214214

215215
$this->assertCount(2,$newNewEntry->getAttribute('mail'));
216216
}
217217

218-
publicfunctiontestLdapRemoveValuesError()
218+
publicfunctiontestLdapRemoveAttributeValuesError()
219219
{
220220
$entryManager =$this->adapter->getEntryManager();
221221

@@ -224,10 +224,10 @@ public function testLdapRemoveValuesError()
224224

225225
$this->{method_exists($this,$_ ='expectException') ?$_ :'setExpectedException'}(LdapException::class);
226226

227-
$entryManager->removeValues($entry,'mail',array('fabpot@example.org'));
227+
$entryManager->removeAttributeValues($entry,'mail',array('fabpot@example.org'));
228228
}
229229

230-
publicfunctiontestLdapAddValuesError()
230+
publicfunctiontestLdapAddAttributeValuesError()
231231
{
232232
$entryManager =$this->adapter->getEntryManager();
233233

@@ -236,6 +236,6 @@ public function testLdapAddValuesError()
236236

237237
$this->{method_exists($this,$_ ='expectException') ?$_ :'setExpectedException'}(LdapException::class);
238238

239-
$entryManager->addValues($entry,'mail',$entry->getAttribute('mail'));
239+
$entryManager->addAttributeValues($entry,'mail',$entry->getAttribute('mail'));
240240
}
241241
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp