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

Appearance settings

Commit 90e577c

Browse filesBrowse files
committed
feature #18492 [LDAP] Check whether an entry attribute exists (hiddewie)
This PR was merged into the 3.1-dev branch. Discussion ---------- [LDAP] Check whether an entry attribute exists | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Currently a method exists for getting the value of an attribute. It would make the Entry class more complete to be able to simply test if an attribute exists in the entry. Commits ------- 56ef8a0 [LDAP] Check whether an entry attribute exists
2 parents becdbd9 + 56ef8a0 commit 90e577c
Copy full SHA for 90e577c

File tree

Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-0
lines changed

‎src/Symfony/Component/Ldap/Entry.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Ldap/Entry.php
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,18 @@ public function getDn()
3535
return $this->dn;
3636
}
3737

38+
/**
39+
* Returns whether an attribute exists.
40+
*
41+
* @param $name string The name of the attribute
42+
*
43+
* @return bool
44+
*/
45+
public function hasAttribute($name)
46+
{
47+
return isset($this->attributes[$name]);
48+
}
49+
3850
/**
3951
* Returns a specific attribute's value.
4052
*

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.