Zend_Ldap
コンポーネント用のオプション配列は、
コンストラクタあるいはsetOptions()
メソッドで指定できます。
下記のオプションが利用できます:
表80 Zend_Ldapオプション
名前 | 説明 |
---|---|
host |
LDAPサーバのデフォルトのホスト名。
connect() で指定しなかった場合に使用します
(bind() の際にユーザ名を正規化するときにも使用します)。
|
port |
LDAPサーバのデフォルトのポート。
connect() で指定しなかった場合に使用します。
|
useStartTls |
LDAPクライアント側に
TLS(別名SSLv2)
での暗号化トランスポートを要求するか否か。
実運用環境では TRUE を指定することを強く推奨します。
これにより、パスワードが平文で送られてしまうことを防ぎます。
デフォルト値は FALSE です。
というのも、この機能を使用するにはサーバ側に別途、
証明書のインストールが必要となることが多いからです。
useSslオプションと
useStartTlsオプションは共存できません。
useStartTlsオプションのほうが
useSslより推奨されていますが、
中にはこの新しい仕組みをサポートしていないサーバもあります。
|
useSsl | LDAPクライアント側に SSLでの暗号化トランスポートを要求するか否か。 useSslオプションと useStartTls オプションは共存できません。 |
username | デフォルトの認証ユーザ名。 サーバによっては、DN 形式を要求するものもあります。 DN にバインドすることをLDAPサーバーが要求するならば、 これは DN 形式で与えられなければなりません。 そして、バインディングは単純なユーザー名で可能でなければなりません |
password | デフォルトの認証パスワード (上のユーザ名との組み合わせでのみ使用します)。 |
bindRequiresDn |
TRUE を指定すると、ユーザ名が DN 形式でない場合に
Zend_Ldap をバインド時に使用してアカウントの DN を取得します。
デフォルト値は FALSE です。
|
baseDn | (アカウントなどの) 検索に使用するデフォルトのベース DN。 このオプションは、アカウントに関する大半の操作で必須となります。 そのアカウントが存在する DN を指す必要があります。 |
accountCanonicalForm | アカウント名の正規化方式を表す整数値。 以下の アカウント名の正規化 節を参照ください。 |
accountDomainName | 対象となるLDAPサーバの FQDN ドメイン (例 example.com)。 |
accountDomainNameShort | 対象となるLDAPサーバの '短い' ドメイン。 これは、Windows ネットワークの NetBIOS ドメイン名として用いられますが、 AD 以外のサーバで用いられることもあります。 |
accountFilterFormat |
アカウントを検索する際に使用するLDAP検索フィルタ。
この文字列は
sprintf()
形式のものとなり、ユーザ名を表す '%s'
をひとつ含む必要があります。デフォルト値は
'(&(objectClass=user)(sAMAccountName=%s))' です。
ただし、bindRequiresDn が TRUE
の場合のデフォルト値は
'(&(objectClass=posixAccount)(uid=%s))'
となります。独自のスキーマを使用している場合は、
それにあわせてこのオプションを変更しなければなりません。
|
allowEmptyPassword |
LDAPサーバによっては、
匿名バインドの際のパスワードに空文字を設定できるものもあります。
この挙動は、ほとんどの場合において好ましくないものです。
そのため、空のパスワードは明示的に無効にしています。
この値をTRUE にすると、
バインド時に空文字列のパスワードを使用できるようになります。
|
optReferrals |
TRUE に設定すると、
参照先を追跡するようLDAPクライアントに指示します。
デフォルト値はFALSE です。
|
tryUsernameSplit |
FALSE にセットすると、
バインディング手続きの間、与えられたユーザー名において
ユーザー名をドメインから切り離すために、
最初の@または\文字で分割してはいけないことを示します。
これにより、一部のドメーン情報を継承しない
(例えばバインディングのための電子メール・アドレスを使用する)、
@または\を含むユーザー名を
ユーザーが利用できるようになります。
デフォルト値はTRUE です。
|
注記
斜体のメソッド名は static メソッドです。
Zend_Ldap
is the base interface into a LDAP
server. It provides connection and binding methods as well as methods to operate on the
LDAP tree.
表81 Zend_Ldap API
Method | Description |
---|---|
string filterEscape(string $str) |
Escapes a value to be used in a LDAP filter according to
RFC 2254. This method is deprecated,
please use Zend_Ldap_Filter_Abstract::escapeValue()
instead.
|
boolean explodeDn($dn, array &$keys = null, array &$vals =
null)
|
Checks if a given DN $dn is malformed. If
$keys or $keys and
$vals are given, these arrays will be filled with the
appropriate DN keys and values. This method is
deprecated, please use
Zend_Ldap_Dn::checkDn() instead.
|
__construct($options) |
Constructor. The $options parameter is optional
and can be set to an array or a Zend_Config instance.
If no options are provided at instantiation, the connection
parameters must be passed to the instance using
Zend_Ldap::setOptions() . The allowed options are
specified in Zend_Ldap
Options
|
resource getResource() |
Returns the raw LDAP extension (ext/ldap) resource. |
integer getLastErrorCode() |
Returns the LDAP error number of the last LDAP command. |
string getLastError(integer &$errorCode, array
&$errorMessages)
|
Returns the LDAP error message of the last
LDAP command. The optional $errorCode
parameter is set to the LDAP error number when given. The
optional $errorMessages array will be filled with the raw
error messages when given. The various LDAP error
retrieval functions can return different things, so they are all collected
if $errorMessages is given.
|
Zend_Ldap setOptions($options) |
Sets the LDAP connection and binding parameters.
$options can be an array or an instance of
Zend_Config . The allowed options are specified in
Zend_Ldap Options
|
array getOptions() |
Returns the current connection and binding parameters. |
string getBaseDn() |
Returns the base DN this LDAP connection is bound to. |
string getCanonicalAccountName(string $acctname, integer $form)
|
Returns the canonical account name of the given account name
$acctname . $form specifies the format
into which the account name is canonicalized. See Account
Name Canonicalization for more details.
|
Zend_Ldap disconnect() |
Disconnects the Zend_Ldap instance from the
LDAP server.
|
Zend_Ldap connect(string $host, integer $port, boolean $useSsl,
boolean $useStartTls)
|
Connects the Zend_Ldap instance to the given
LDAP server. All parameters are optional and will be
taken from the LDAP connection and binding parameters
passed to the instance via the constructor or via
Zend_Ldap::setOptions() when set to
NULL .
|
Zend_Ldap bind(string $username, string $password)
|
Authenticates $username with
$password at the LDAP server. If both
parameters are omitted the binding will be carried out with the credentials
given in the connection and binding parameters. If no credentials are
given in the connection and binding parameters an anonymous bind
will be performed. Note that this requires anonymous binds to be allowed
on the LDAP server. An empty string '' can
be passed as $password together with a username if, and
only if, allowEmptyPassword is set to
TRUE in the connection and binding parameters.
|
Zend_Ldap_Collection search(string|Zend_Ldap_Filter_Abstract $filter,
string|Zend_Ldap_Dn $basedn, integer $scope, array $attributes, string
$sort, string $collectionClass)
|
Searches the LDAP tree with the given
$filter and the given search parameters.
|
integer count(string|Zend_Ldap_Filter_Abstract
$filter, string|Zend_Ldap_Dn $basedn, integer
$scope)
|
Counts the elements returned by the given search parameters.
See Zend_Ldap::search() for a detailed description
of the method parameters.
|
integer countChildren(string|Zend_Ldap_Dn $dn) |
Counts the direct descendants (children) of the entry
identified by the given $dn .
|
boolean exists(string|Zend_Ldap_Dn $dn) |
Checks whether the entry identified by the given
$dn exists.
|
array searchEntries(string|Zend_Ldap_Filter_Abstract
$filter, string|Zend_Ldap_Dn $basedn, integer $scope, array
$attributes, string $sort)
|
Performs a search operation and returns the result as an
PHP array. This is essentially the same method as
Zend_Ldap::search() except for the return type. See
Zend_Ldap::search() for a detailed description of
the method parameters.
|
array getEntry(string|Zend_Ldap_Dn $dn, array
$attributes, boolean $throwOnNotFound)
|
Retrieves the LDAP entry identified by
$dn with the attributes specified in
$attributes . if $attributes is
ommitted, all attributes (array() ) are included in
the result. $throwOnNotFound is
FALSE by default, so the method will return
NULL if the specified entry cannot be found. If set to
TRUE , a Zend_Ldap_Exception will
be thrown instead.
|
void prepareLdapEntryArray(array
&$entry)
|
Prepare an array for the use in LDAP modification operations. This method does not need to be called by the end-user as it's implicitly called on every data modification method. |
Zend_Ldap add(string|Zend_Ldap_Dn $dn, array
$entry)
|
Adds the entry identified by $dn with its attributes
$entry to the LDAP tree. Throws a
Zend_Ldap_Exception if the entry could not be
added.
|
Zend_Ldap update(string|Zend_Ldap_Dn $dn, array $entry)
|
Updates the entry identified by $dn with its attributes
$entry to the LDAP tree. Throws a
Zend_Ldap_Exception if the entry could not be
modified.
|
Zend_Ldap save(string|Zend_Ldap_Dn $dn, array $entry)
|
Saves the entry identified by $dn with its attributes
$entry to the LDAP tree. Throws a
Zend_Ldap_Exception if the entry could not be saved.
This method decides by querying the LDAP tree if the
entry will be added or updated.
|
Zend_Ldap delete(string|Zend_Ldap_Dn $dn, boolean $recursively)
|
Deletes the entry identified by $dn from the
LDAP tree. Throws a
Zend_Ldap_Exception if the entry could not be
deleted. $recursively is FALSE by
default. If set to TRUE the deletion will be carried
out recursively and will effectively delete a complete subtree. Deletion
will fail if $recursively is FALSE
and the entry $dn is not a leaf entry.
|
Zend_Ldap moveToSubtree(string|Zend_Ldap_Dn $from,
string|Zend_Ldap_Dn $to, boolean $recursively, boolean
$alwaysEmulate)
|
Moves the entry identified by $from to a location below
$to keeping its RDN unchanged.
$recursively specifies if the operation will be
carried out recursively (FALSE by default) so that the
entry $from and all its descendants will be moved.
Moving will fail if $recursively is
FALSE and the entry $from is not a
leaf entry. $alwaysEmulate controls whether the ext/ldap
function ldap_rename() should be used if available.
This can only work for leaf entries and for servers and for ext/ldap
supporting this function. Set to TRUE to always use an
emulated rename operation.
注記All move-operations are carried out by copying and then deleting the corresponding entries in the LDAP tree. These operations are not atomic so that failures during the operation will result in an inconsistent state on the LDAP server. The same is true for all recursive operations. They also are by no means atomic. Please keep this in mind. |
Zend_Ldap move(string|Zend_Ldap_Dn $from,
string|Zend_Ldap_Dn $to, boolean $recursively, boolean
$alwaysEmulate)
|
This is an alias for Zend_Ldap::rename() .
|
Zend_Ldap rename(string|Zend_Ldap_Dn $from,
string|Zend_Ldap_Dn $to, boolean $recursively, boolean
$alwaysEmulate)
|
Renames the entry identified by $from to
$to . $recursively specifies if the
operation will be carried out recursively (FALSE by
default) so that the entry $from and all its
descendants will be moved. Moving will fail if
$recursively is FALSE and the entry
$from is not a leaf entry.
$alwaysEmulate controls whether the ext/ldap function
ldap_rename() should be used if available. This can
only work for leaf entries and for servers and for ext/ldap supporting this
function. Set to TRUE to always use an emulated rename
operation.
|
Zend_Ldap copyToSubtree(string|Zend_Ldap_Dn $from,
string|Zend_Ldap_Dn $to, boolean $recursively)
|
Copies the entry identified by $from to a location below
$to keeping its RDN unchanged.
$recursively specifies if the operation will be
carried out recursively (FALSE by default) so that the
entry $from and all its descendants will be copied.
Copying will fail if $recursively is
FALSE and the entry $from is not a
leaf entry.
|
Zend_Ldap copy(string|Zend_Ldap_Dn $from,
string|Zend_Ldap_Dn $to, boolean $recursively)
|
Copies the entry identified by $from to
$to . $recursively specifies if the
operation will be carried out recursively (FALSE by
default) so that the entry $from and all its
descendants will be copied. Copying will fail if
$recursively is FALSE and the entry
$from is not a leaf entry.
|
Zend_Ldap_Node getNode(string|Zend_Ldap_Dn $dn) |
Returns the entry $dn wrapped in a
Zend_Ldap_Node .
|
Zend_Ldap_Node getBaseNode() |
Returns the entry for the base DN $baseDn
wrapped in a Zend_Ldap_Node .
|
Zend_Ldap_Node_RootDse getRootDse() |
Returns the RootDSE for the current server. |
Zend_Ldap_Node_Schema getSchema() |
Returns the LDAP schema for the current server. |
Zend_Ldap_Collection
implements Iterator
to
allow for item traversal using foreach()
and
Countable
to be able to respond to count()
. With
its protected _createEntry()
method it provides a simple
extension point for developers needing custom result objects.
表82 Zend_Ldap_Collection API
Method | Description |
---|---|
__construct(Zend_Ldap_Collection_Iterator_Interface
$iterator)
|
Constructor. The constrcutor must be provided by a
Zend_Ldap_Collection_Iterator_Interface which
does the real result iteration.
Zend_Ldap_Collection_Iterator_Default is the
default implementation for iterating ext/ldap results.
|
boolean close() |
Closes the internal iterator. This is also called in the destructor. |
array toArray() |
Returns all entries as an array. |
array getFirst() |
Returns the first entry in the collection or
NULL if the collection is empty.
|
Zend_Ldap_Attribute
is a helper class providing only static
methods to manipulate arrays suitable to the structure used in
Zend_Ldap
data modification methods and to the data format required
by the LDAP server. PHP data types are converted the
following way:
string
No conversion will be done.
integer
andfloat
The value will be converted to a string.
boolean
TRUE
will be converted to 'TRUE
' andFALSE
to 'FALSE
'object
andarray
The value will be converted to a string by using
serialize()
.resource
If a
stream
resource is given, the data will be fetched by callingstream_get_contents()
.- others
All other data types (namely non-stream resources) will be ommitted.
On reading attribute values the following conversion will take place:
- '
TRUE
' Converted to
TRUE
.- '
FALSE
' Converted to
FALSE
.- others
All other strings won't be automatically converted and are passed as they are.
表83 Zend_Ldap_Attribute API
Method | Description |
---|---|
void setAttribute(array &$data, string
$attribName, mixed $value, boolean $append)
|
Sets the attribute $attribName in
$data to the value $value . If
$append is TRUE
(FALSE by default) $value will be
appended to the attribute. $value can be a scalar value
or an array of scalar values. Conversion will take place.
|
array|mixed getAttribute(array $data,
string $attribName, integer|null $index)
|
Returns the attribute $attribName from
$data . If $index is
NULL (default) an array will be returned containing all
the values for the given attribute. An empty array will be returned if the
attribute does not exist in the given array. If an integer index is
specified the corresponding value at the given index will be
returned. If the index is out of bounds, NULL will be
returned. Conversion will take place.
|
boolean attributeHasValue(array &$data,
string $attribName, mixed|array $value)
|
Checks if the attribute $attribName in
$data has the value(s) given in
$value . The method returns TRUE only
if all values in $value are present in the attribute.
Comparison is done strictly (respecting the data type).
|
void removeDuplicatesFromAttribute(array
&$data, string $attribName)
|
Removes all duplicates from the attribute
$attribName in $data .
|
void removeFromAttribute(array &$data,
string $attribName, mixed|array $value)
|
Removes the value(s) given in $value from
the attribute $attribName in
$data .
|
string|null convertToLdapValue(mixed
$value)
|
Converts a PHP data type into its LDAP representation. See introduction for details. |
mixed convertFromLdapValue(string
$value)
|
Converts an LDAP value into its PHP data type. See introduction for details. |
string|null
convertToLdapDateTimeValue(integer $value, boolean $utc)
|
Converts a timestamp into its LDAP date/time
representation. If $utc is TRUE
(FALSE by default) the resulting
LDAP date/time string will be in UTC,
otherwise a local date/time string will be returned.
|
integer|null
convertFromLdapDateTimeValue(string $value)
|
Converts LDAP date/time representation into a timestamp.
The method returns NULL if $value
can not be converted back into a PHP timestamp.
|
void setPassword(array &$data, string
$password, string $hashType, string $attribName)
|
Sets a LDAP password for the attribute
$attribName in $data .
$attribName defaults to 'userPassword'
which is the standard password attribute. The password hash can be
specified with $hashType . The default value here is
Zend_Ldap_Attribute::PASSWORD_HASH_MD5 with
Zend_Ldap_Attribute::PASSWORD_HASH_SHA as the other
possibilty.
|
string createPassword(string $password,
string $hashType)
|
Creates a LDAP password. The password hash can be
specified with $hashType . The default value here is
Zend_Ldap_Attribute::PASSWORD_HASH_MD5 with
Zend_Ldap_Attribute::PASSWORD_HASH_SHA as the other
possibilty.
|
void setDateTimeAttribute(array &$data,
string $attribName, integer|array $value, boolean $utc, boolean
$append)
|
Sets the attribute $attribName in
$data to the date/time value $value .
if $append is TRUE
(FALSE by default) $value will be
appended to the attribute. $value can be an integer value
or an array of integers. Date-time-conversion according to
Zend_Ldap_Attribute::convertToLdapDateTimeValue()
will take place.
|
array|integer getDateTimeAttribute(array
$data, string $attribName, integer|null $index)
|
Returns the date/time attribute $attribName
from $data . If $index is
NULL (default) an array will be returned containing
all the date/time values for the given attribute. An empty array
will be returned if the attribute does not exist in the given
array. If an integer index is specified the corresponding date/time
value at the given index will be returned. If the index is out of
bounds, NULL will be returned. Date-time-conversion
according to
Zend_Ldap_Attribute::convertFromLdapDateTimeValue()
will take place.
|
Zend_Ldap_Dn
provides an object-oriented interface to
manipulating LDAP distinguished names (DN). The parameter
$caseFold
that is used in several methods determines the way DN
attributes are handled regarding their case. Allowed values for this paraneter are:
Zend_Ldap_Dn::ATTR_CASEFOLD_NONE
No case-folding will be done.
Zend_Ldap_Dn::ATTR_CASEFOLD_UPPER
All attributes will be converted to upper-case.
Zend_Ldap_Dn::ATTR_CASEFOLD_LOWER
All attributes will be converted to lower-case.
The default case-folding is Zend_Ldap_Dn::ATTR_CASEFOLD_NONE
and
can be set with Zend_Ldap_Dn::setDefaultCaseFold()
. Each instance
of Zend_Ldap_Dn
can have its own case-folding-setting. If the
$caseFold
parameter is ommitted in method-calls it defaults to the
instance's case-folding setting.
The class implements ArrayAccess
to allow indexer-access to the
different parts of the DN. The ArrayAccess
-methods proxy to
Zend_Ldap_Dn::get($offset, 1, null)
for offsetGet(integer
$offset)
, to Zend_Ldap_Dn::set($offset, $value)
for
offsetSet()
and to
Zend_Ldap_Dn::remove($offset, 1)
for
offsetUnset()
. offsetExists()
simply
checks if the index is within the bounds.
表84 Zend_Ldap_Dn API
Method | Description |
---|---|
Zend_Ldap_Dn factory(string|array $dn,
string|null $caseFold)
|
Creates a Zend_Ldap_Dn instance from an array
or a string. The array must conform to the array structure detailed
under Zend_Ldap_Dn::implodeDn() .
|
Zend_Ldap_Dn fromString(string $dn,
string|null $caseFold)
|
Creates a Zend_Ldap_Dn instance from a
string.
|
Zend_Ldap_Dn fromArray(array $dn,
string|null $caseFold)
|
Creates a Zend_Ldap_Dn instance from an array.
The array must conform to the array structure detailed under
Zend_Ldap_Dn::implodeDn() .
|
array getRdn(string|null $caseFold) |
Gets the RDN of the current DN. The return value is an array with the RDN attribute names its keys and the RDN attribute values. |
string getRdnString(string|null $caseFold) |
Gets the RDN of the current DN. The return value is a string. |
Zend_Ldap_Dn getParentDn(integer $levelUp) |
Gets the DN of the current DN's ancestor
$levelUp levels up the tree. $levelUp
defaults to 1 .
|
array get(integer $index, integer $length, string|null
$caseFold)
|
Returns a slice of the current DN determined by
$index and $length .
$index starts with 0 on the DN part from the
left.
|
Zend_Ldap_Dn set(integer $index, array $value) |
Replaces a DN part in the current DN. This operation manipulates the current instance. |
Zend_Ldap_Dn remove(integer $index, integer $length) |
Removes a DN part from the current DN. This operation
manipulates the current instance. $length defaults to
1
|
Zend_Ldap_Dn append(array $value) |
Appends a DN part to the current DN. This operation manipulates the current instance. |
Zend_Ldap_Dn prepend(array $value) |
Prepends a DN part to the current DN. This operation manipulates the current instance. |
Zend_Ldap_Dn insert(integer $index, array $value) |
Inserts a DN part after the index $index to the
current DN. This operation manipulates the current
instance.
|
void setCaseFold(string|null $caseFold) |
Sets the case-folding option to the current DN instance. If
$caseFold is NULL the default
case-folding setting (Zend_Ldap_Dn::ATTR_CASEFOLD_NONE
by default or set via
Zend_Ldap_Dn::setDefaultCaseFold() will be set for
the current instance.
|
string toString(string|null $caseFold) |
Returns DN as a string. |
array toArray(string|null $caseFold) |
Returns DN as an array. |
string __toString() |
Returns DN as a string - proxies to
Zend_Ldap_Dn::toString(null) .
|
void setDefaultCaseFold(string
$caseFold)
|
Sets the default case-folding option used by all instances on creation by default. Already existing instances are not affected by this setting. |
array escapeValue(string|array
$values)
|
Escapes a DN value according to RFC 2253. |
array unescapeValue(string|array
$values)
|
Undoes the conversion done by
Zend_Ldap_Dn::escapeValue() .
|
array explodeDn(string $dn, array
&$keys, array &$vals, string|null $caseFold)
|
Explodes the DN array( array("cn" => "name1", "uid" => "user"), array("cn" => "name2"), array("dc" => "example"), array("dc" => "org") )
for a DN of |
boolean checkDn(string $dn, array
&$keys, array &$vals, string|null $caseFold)
|
Checks if a given DN $dn is malformed. If
$keys or $keys and
$vals are given, these arrays will be filled with the
appropriate DN keys and values.
|
string implodeRdn(array $part, string|null
$caseFold)
|
Returns a DN part in the form
$attribute=$value
|
string implodeDn(array $dnArray,
string|null $caseFold, string $separator)
|
Implodes an array in the form delivered by
array( array("cn" => "name1", "uid" => "user"), array("cn" => "name2"), array("dc" => "example"), array("dc" => "org") ) |
boolean isChildOf(string|Zend_Ldap_Dn
$childDn, string|Zend_Ldap_Dn $parentDn)
|
Checks if given $childDn is beneath
$parentDn subtree.
|
表85 Zend_Ldap_Filter API
メソッド | 説明 |
---|---|
Zend_Ldap_Filter equals(string $attr,
string $value)
|
'equals' フィルタを作成
(attr=value)
|
Zend_Ldap_Filter begins(string $attr,
string $value)
|
'begins with' フィルタを作成
(attr=value*)
|
Zend_Ldap_Filter ends(string $attr, string
$value)
|
'ends with' フィルタを作成
(attr=*value)
|
Zend_Ldap_Filter contains(string $attr,
string $value)
|
'contains' フィルタを作成
(attr=*value*)
|
Zend_Ldap_Filter greater(string $attr,
string $value)
|
'greater' フィルタを作成
(attr>value)
|
Zend_Ldap_Filter greaterOrEqual(string
$attr, string $value)
|
'greater or equal' フィルタを作成
(attr>=value)
|
Zend_Ldap_Filter less(string $attr, string
$value)
|
'less' フィルタを作成
(attr<value)
|
Zend_Ldap_Filter lessOrEqual(string $attr,
string $value)
|
'less or equal' フィルタを作成
(attr<=value)
|
Zend_Ldap_Filter approx(string $attr,
string $value)
|
'approx' フィルタを作成
(attr~=value)
|
Zend_Ldap_Filter any(string $attr)
|
'any' フィルタを作成 (attr=*)
|
Zend_Ldap_Filter string(string
$filter)
|
単純なカスタム文字列フィルタを作成。 フィルタはそのまま使われるので、 値のエスケープ全てはユーザーの責任です。 |
Zend_Ldap_Filter mask(string $mask, string
$value,...)
|
文字列のマスクからフィルタを作成。
$value 引数の全てが、
sprintf()
関数を用いて $mask にエスケープされ、置換されます。
|
Zend_Ldap_Filter
andFilter(Zend_Ldap_Filter_Abstract $filter,...)
|
与えられた引数全てから 'and' フィルタを作成 |
Zend_Ldap_Filter
orFilter(Zend_Ldap_Filter_Abstract $filter,...)
|
与えられた引数全てから 'or' フィルタを作成 |
__construct(string $attr, string $value, string
$filtertype, string|null $prepend, string|null
$append)
|
コンストラクタ。
与えられる引数に応じて任意のフィルタを作成します。
結果として生じるフィルタは連結したものです。
$attr . $filtertype . $prepend . $value . $append
通常は、適切なファクトリ・メソッドでフィルタを全て作成できるので、
このコンストラクタは不要です。
|
string toString() |
フィルタの文字列表現を返す |
string __toString() |
フィルタの文字列表現を返す。
Zend_Ldap_Filter::toString() の代理
|
Zend_Ldap_Filter_Abstract negate() |
現行のフィルタを否定 |
Zend_Ldap_Filter_Abstract
addAnd(Zend_Ldap_Filter_Abstract $filter,...)
|
現行のフィルタ、及び引数として渡されたフィルタ全てから 'and' フィルタを作成 |
Zend_Ldap_Filter_Abstract
addOr(Zend_Ldap_Filter_Abstract $filter,...)
|
現行のフィルタ、及び引数として渡されたフィルタ全てから 'or' フィルタを作成 |
string|array escapeValue(string|array
$values)
|
LDAP フィルタで問題なくそれらを使えるように、
RFC 2254 に従って、与えられた $values をエスケープします。
単一の文字列が与えられると、文字列が返され、さもなければ、配列が返されます。
LDAP フィルタで特別な意味を持つ文字、
"*" 、 "(" 、 ")" 及び "\" (バックスラッシュ)に加え、
32 未満の ASCII コードを持つ制御文字も全て
バックスラッシュの後に、文字の16進数を表現する2桁の数字が続く表現に変換されます。
|
string|array unescapeValue(string|array
$values)
|
Zend_Ldap_Filter::escapeValue()
で行われた変換を取り消します。
バックスラッシュの後に2桁の数字が続くと、いずれも対応する文字に変換します。
|
Zend_Ldap_Node
includes the magic property accessors
__set()
, __get()
,
__unset()
and __isset()
to access the
attributes by their name. They proxy to
Zend_Ldap_Node::setAttribute()
,
Zend_Ldap_Node::getAttribute()
,
Zend_Ldap_Node::deleteAttribute()
and
Zend_Ldap_Node::existsAttribute()
respectively. Furthermore the
class implements ArrayAccess
for array-style-access to the attributes.
Zend_Ldap_Node
also implements Iterator
and
RecursiveIterato
to allow for recursive tree-traversal.
表86 Zend_Ldap_Node API
Method | Description |
---|---|
Zend_Ldap getLdap() |
Returns the current LDAP connection. Throws
Zend_Ldap_Exception if current node is in detached
mode (not connected to a Zend_Ldap instance).
|
Zend_Ldap_Node attachLdap(Zend_Ldap $ldap) |
Attach the current node to the $ldap
Zend_Ldap instance. Throws
Zend_Ldap_Exception if $ldap is
not responsible for the current node (node is not a child of the
$ldap base DN).
|
Zend_Ldap_Node detachLdap() |
Detach node from LDAP connection. |
boolean isAttached() |
Checks if the current node is attached to a LDAP connection. |
Zend_Ldap_Node create(string|array|Zend_Ldap_Dn $dn, array
$objectClass)
|
Factory method to create a new detached
Zend_Ldap_Node for a given DN. Creates a new
Zend_Ldap_Node with the DN $dn and
the object-classes $objectClass .
|
Zend_Ldap_Node fromLdap(string|array|Zend_Ldap_Dn $dn,
Zend_Ldap $ldap)
|
Factory method to create an attached
Zend_Ldap_Node for a given DN. Loads an existing
Zend_Ldap_Node with the DN $dn
from the LDAP connection $ldap .
|
Zend_Ldap_Node fromArray((array $data,
boolean $fromDataSource)
|
Factory method to create a detached Zend_Ldap_Node
from array data $data . if
$fromDataSource is TRUE
(FALSE by default), the data is treated as beeing
present in a LDAP tree.
|
boolean isNew() |
Tells if the node is consiedered as new (not present on the
server). Please note, that this doesn't tell if the node is really
present on the server. Use Zend_Ldap_Node::exists()
to see if a node is already there.
|
boolean willBeDeleted() |
Tells if this node is going to be deleted once
Zend_Ldap_Node::update() is called.
|
Zend_Ldap_Node delete() |
Marks this node as to be deleted. Node will be deleted on
calling Zend_Ldap_Node::update() if
Zend_Ldap_Node::willBeDeleted() is
TRUE .
|
boolean willBeMoved() |
Tells if this node is going to be moved once
Zend_Ldap_Node::update() is called.
|
Zend_Ldap_Node update(Zend_Ldap $ldap) |
Sends all pending changes to the LDAP server. If
$ldap is omitted the current LDAP
connection is used. If the current node is detached from a
LDAP connection a
Zend_Ldap_Exception will be thrown. If
$ldap is provided the current node will be attached to
the given LDAP connection.
|
Zend_Ldap_Dn getCurrentDn() |
Gets the current DN of the current node as a
Zend_Ldap_Dn . This does not reflect possible
rename-operations.
|
Zend_Ldap_Dn getDn() |
Gets the original DN of the current node as a
Zend_Ldap_Dn . This reflects possible
rename-operations.
|
string getDnString(string $caseFold) |
Gets the original DN of the current node as a string. This reflects possible rename-operations. |
array getDnArray(string $caseFold) |
Gets the original DN of the current node as an array. This reflects possible rename-operations. |
string getRdnString(string $caseFold) |
Gets the RDN of the current node as a string. This reflects possible rename-operations. |
array getRdnArray(string $caseFold) |
Gets the RDN of the current node as an array. This reflects possible rename-operations. |
Zend_Ldap_Node setDn(Zend_Ldap_Dn|string|array $newDn)
|
Sets the new DN for this node effectively moving the node
once Zend_Ldap_Node::update() is called.
|
Zend_Ldap_Node move(Zend_Ldap_Dn|string|array $newDn)
|
This is an alias for Zend_Ldap_Node::setDn() .
|
Zend_Ldap_Node rename(Zend_Ldap_Dn|string|array $newDn)
|
This is an alias for Zend_Ldap_Node::setDn() .
|
array getObjectClass() |
Returns the objectClass of the node. |
Zend_Ldap_Node setObjectClass(array|string $value) |
Sets the objectClass attribute. |
Zend_Ldap_Node appendObjectClass(array|string $value)
|
Appends to the objectClass attribute. |
string toLdif(array $options) |
Returns a LDIF representation of the current node.
$options will be passed to the
Zend_Ldap_Ldif_Encoder .
|
array getChangedData() |
Gets changed node data. The array contains all changed
attributes. This format can be used in
Zend_Ldap::add() and
Zend_Ldap::update() .
|
array getChanges() |
Returns all changes made. |
string toString() |
Returns the DN of the current node - proxies to
Zend_Ldap_Dn::getDnString() .
|
string __toString() |
Casts to string representation - proxies to
Zend_Ldap_Dn::toString() .
|
array toArray(boolean $includeSystemAttributes) |
Returns an array representation of the current node. If
$includeSystemAttributes is FALSE
(defaults to TRUE ) the system specific attributes are
stripped from the array. Unlike
Zend_Ldap_Node::getAttributes() the resulting array
contains the DN with key 'dn' .
|
string toJson(boolean $includeSystemAttributes) |
Returns a JSON representation of the current node using
Zend_Ldap_Node::toArray() .
|
array getData(boolean $includeSystemAttributes) |
Returns the node's attributes. The array contains all attributes in its internal format (no conversion). |
boolean existsAttribute(string $name, boolean $emptyExists)
|
Checks whether a given attribute exists. If
$emptyExists is FALSE empty
attributes (containing only array()) are treated as non-existent returning
FALSE . If $emptyExists is
TRUE empty attributes are treated as existent returning
TRUE . In this case the method returns
FALSE only if the attribute name is missing in the
key-collection.
|
boolean attributeHasValue(string $name, mixed|array $value)
|
Checks if the given value(s) exist in the attribute. The
method returns TRUE only if all values in
$value are present in the attribute. Comparison is
done strictly (respecting the data type).
|
integer count() |
Returns the number of attributes in the node. Implements Countable. |
mixed getAttribute(string $name, integer|null $index)
|
Gets a LDAP attribute. Data conversion is applied using
Zend_Ldap_Attribute::getAttribute() .
|
array getAttributes(boolean $includeSystemAttributes)
|
Gets all attributes of node. If
$includeSystemAttributes is FALSE
(defaults to TRUE ) the system specific attributes are
stripped from the array.
|
Zend_Ldap_Node setAttribute(string $name, mixed $value)
|
Sets a LDAP attribute. Data conversion is applied using
Zend_Ldap_Attribute::setAttribute() .
|
Zend_Ldap_Node appendToAttribute(string $name, mixed $value)
|
Appends to a LDAP attribute. Data conversion is applied
using Zend_Ldap_Attribute::setAttribute() .
|
array|integer getDateTimeAttribute(string $name,
integer|null $index)
|
Gets a LDAP date/time attribute. Data conversion is
applied using
Zend_Ldap_Attribute::getDateTimeAttribute() .
|
Zend_Ldap_Node setDateTimeAttribute(string $name,
integer|array $value, boolean $utc)
|
Sets a LDAP date/time attribute. Data conversion is
applied using
Zend_Ldap_Attribute::setDateTimeAttribute() .
|
Zend_Ldap_Node appendToDateTimeAttribute(string $name,
integer|array $value, boolean $utc)
|
Appends to a LDAP date/time attribute. Data conversion is
applied using
Zend_Ldap_Attribute::setDateTimeAttribute() .
|
Zend_Ldap_Node setPasswordAttribute(string $password,
string $hashType, string $attribName)
|
Sets a LDAP password on $attribName
(defaults to 'userPassword' ) to $password
with the hash type $hashType (defaults to
Zend_Ldap_Attribute::PASSWORD_HASH_MD5 ).
|
Zend_Ldap_Node deleteAttribute(string $name) |
Deletes a LDAP attribute. |
void removeDuplicatesFromAttribute(string$name) |
Removes duplicate values from a LDAP attribute. |
void removeFromAttribute(string $attribName,
mixed|array $value)
|
Removes the given values from a LDAP attribute. |
boolean exists(Zend_Ldap $ldap) |
Checks if the current node exists on the given LDAP
server (current server is used if NULL is passed).
|
Zend_Ldap_Node reload(Zend_Ldap $ldap) |
Reloads the current node's attributes from the given LDAP
server (current server is used if NULL is
passed).
|
Zend_Ldap_Node_Collection
searchSubtree(string|Zend_Ldap_Filter_Abstract $filter, integer
$scope, string $sort)
|
Searches the nodes's subtree with the given
$filter and the given search parameters. See
Zend_Ldap::search() for details on the parameters
$scope and $sort .
|
integer countSubtree(string|Zend_Ldap_Filter_Abstract
$filter, integer $scope)
|
Count the nodes's subtree items matching the given
$filter and the given search scope. See
Zend_Ldap::search() for details on the
$scope parameter.
|
integer countChildren() |
Count the nodes's children. |
Zend_Ldap_Node_Collection
searchChildren(string|Zend_Ldap_Filter_Abstract $filter, string
$sort)
|
Searches the nodes's children matching the given
$filter . See Zend_Ldap::search()
for details on the $sort parameter.
|
boolean hasChildren() |
Returns whether the current node has children. |
Zend_Ldap_Node_ChildrenIterator getChildren() |
Returns all children of the current node. |
Zend_Ldap_Node getParent(Zend_Ldap $ldap) |
Returns the parent of the current node using the LDAP
connection $ldap (uses the current
LDAP connection if omitted).
|
ベンダー固有のサブクラス全てで下記のメソッドが利用可能です。
Zend_Ldap_Node_RootDse
は、
名前により属性にアクセスするための __get()
及び __isset()
マジック・プロパティー・アクセッサを含みます。
それらはそれぞれ、 Zend_Ldap_Node_RootDse::getAttribute()
及び
Zend_Ldap_Node_RootDse::existsAttribute()
を代理します。
__set()
及び __unset()
も実装されます。
しかし、 RootDSE ノードで認められない変更次第では
BadMethodCallException
をスローします。
さらに、属性に配列のようにアクセスするために
クラスは ArrayAccess
を実装します。
offsetSet()
及び offsetUnset()
も
明白な理由に起因する BadMethodCallException
をスローします。
表87 Zend_Ldap_Node_RootDse API
メソッド | 説明 |
---|---|
Zend_Ldap_Dn getDn() |
Zend_Ldap_Dn として現行ノードの DN を取得 |
string getDnString(string $caseFold) |
文字列として現行ノードの DN を取得 |
array getDnArray(string $caseFold) |
配列として現行ノードの DN を取得 |
string getRdnString(string $caseFold) |
文字列として現行ノードの RDN を取得 |
array getRdnArray(string $caseFold) |
配列として現行ノードの RDN を取得 |
array getObjectClass() |
ノードの objectClass を返します |
string toString() |
現行ノードの DN を返します。
Zend_Ldap_Dn::getDnString() の代理です
|
string __toString() |
文字列表現にキャストします。
Zend_Ldap_Dn::toString() の代理です
|
array toArray(boolean
$includeSystemAttributes)
|
現行ノードの配列表現を返します。
もし $includeSystemAttributes が FALSE
(既定値は TRUE ) なら、システム固有の属性は配列から除去されます。
Zend_Ldap_Node_RootDse::getAttributes() とは異なり、
結果の配列には キー 'dn' をもつ DN を含みます。
|
string toJson(boolean
$includeSystemAttributes)
|
Zend_Ldap_Node_RootDse::toArray() を用いて
現行ノードの JSON 表現を返します。
|
array getData(boolean
$includeSystemAttributes)
|
ノードの属性を返します。 配列は属性全てをその内部フォーマットに含みます。(変換無し) |
boolean existsAttribute(string $name, boolean
$emptyExists)
|
与えられた属性が存在するかどうかチェックします。
もし $emptyExists が FALSE なら、
空の属性 (array() のみを含む) は、
FALSE を返す、存在しないものとして扱われます。
もし $emptyExists が TRUE なら、
空の属性は TRUE を返す、存在するものとして扱われます。
この場合、属性の名前がキーの集合に欠落している場合のみ、
メソッドは FALSE を返します。
|
boolean attributeHasValue(string $name, mixed|array
$value)
|
与えられた値が属性に存在するかチェックします。
$value 内の値全てが属性に現れる場合のみ、
メソッドは TRUE を返します。
比較は厳格に行なわれます。(データ型を考慮します)
|
integer count() |
ノードの属性数を返します。 Countable を実装します。 |
mixed getAttribute(string $name, integer|null
$index)
|
LDAP 属性を取得します。データ変換は
Zend_Ldap_Attribute::getAttribute() を使って適用されます。
|
array getAttributes(boolean
$includeSystemAttributes)
|
ノードの属性全てを取得します。もし
$includeSystemAttributes が FALSE なら、
(既定は TRUE ) システム固有の属性は配列から除去されます。
|
array|integer getDateTimeAttribute(string $name,
integer|null $index)
|
LDAP の日付/時刻属性を取得します。データ変換は
Zend_Ldap_Attribute::getDateTimeAttribute() を使って適用されます。
|
Zend_Ldap_Node_RootDse reload(Zend_Ldap
$ldap)
|
与えられた LDAP サーバから現行ノードの属性を再読み込みします。 |
Zend_Ldap_Node_RootDse create(Zend_Ldap
$ldap)
|
RootDSE を生成するファクトリー・メソッド |
array getNamingContexts() |
namingContexts を取得 |
string|null getSubschemaSubentry() |
subschemaSubentry を取得 |
boolean supportsVersion(string|int|array
$versions)
|
その LDAP のバージョンがサポートされるかどうか判定します |
boolean supportsSaslMechanism(string|array
$mechlist)
|
sasl 機構がサポートされるかどうか判定します |
integer getServerType() |
サーバの種類を取得します。(翻訳者挿入:下記のいずれかを)返します。
|
Zend_Ldap_Dn getSchemaDn() |
スキーマ DN を返します |
さらに、上記の共通メソッドが
Zend_Ldap_Node_RootDse_OpenLdap
のインスタンスに適用されます。
注記
OpenLDAP RootDSE の属性についての情報は LDAP Operational Attributes and Objects を参照してください。
表88 Zend_Ldap_Node_RootDse_OpenLdap API
メソッド | 説明 |
---|---|
integer getServerType() |
サーバの種類を取得します。
Zend_Ldap_Node_RootDse::SERVER_TYPE_OPENLDAP
を返します
|
string|null getConfigContext() |
configContext を取得 |
string|null getMonitorContext() |
monitorContext を取得 |
boolean supportsControl(string|array
$oids)
|
その制御がサポートされるかどうか判定します |
boolean supportsExtension(string|array
$oids)
|
そのエクステンションがサポートされるかどうか判定します |
boolean supportsFeature(string|array
$oids)
|
そのフィーチャーがサポートされるかどうか判定します |
さらに、上記の共通メソッドが
Zend_Ldap_Node_RootDse_ActiveDirectory
のインスタンスに適用されます。
注記
Microsoft ActiveDirectory RootDSE の属性についての情報は RootDSE を参照してください。
表89 Zend_Ldap_Node_RootDse_ActiveDirectory API
メソッド | 説明 |
---|---|
integer getServerType() |
サーバの種類を取得します。
Zend_Ldap_Node_RootDse::SERVER_TYPE_ACTIVEDIRECTORY
を返します
|
string|null
getConfigurationNamingContext()
|
configurationNamingContext を取得 |
string|null getCurrentTime() |
currentTime を取得 |
string|null
getDefaultNamingContext()
|
defaultNamingContext を取得 |
string|null getDnsHostName() |
dnsHostName を取得 |
string|null
getDomainControllerFunctionality()
|
domainControllerFunctionality を取得 |
string|null
getDomainFunctionality()
|
domainFunctionality を取得 |
string|null getDsServiceName() |
dsServiceName を取得 |
string|null
getForestFunctionality()
|
forestFunctionality を取得 |
string|null
getHighestCommittedUSN()
|
highestCommittedUSN を取得 |
string|null
getIsGlobalCatalogReady()
|
isGlobalCatalogReady を取得 |
string|null getIsSynchronized() |
isSynchronized を取得 |
string|null getLdapServiceName() |
ldapServiceName を取得 |
string|null
getRootDomainNamingContext()
|
rootDomainNamingContext を取得 |
string|null
getSchemaNamingContext()
|
schemaNamingContext を取得 |
string|null getServerName() |
serverName を取得 |
boolean supportsCapability(string|array
$oids)
|
その機能がサポートされるかどうか判定します |
boolean supportsControl(string|array
$oids)
|
その制御がサポートされるかどうか判定します |
boolean supportsPolicy(string|array
$policies)
|
そのバージョンがサポートされるかどうか判定します |
さらに、上記の共通メソッドが
Zend_Ldap_Node_RootDse_eDirectory
のインスタンスに適用されます。
注記
Novell eDirectory RootDSE の属性についての情報は Getting Information about the LDAP Server を参照してください。
表90 Zend_Ldap_Node_RootDse_eDirectory API
メソッド | 説明 |
---|---|
integer getServerType() |
サーバの種類を取得します。
Zend_Ldap_Node_RootDse::SERVER_TYPE_EDIRECTORY
を返します。
|
boolean supportsExtension(string|array
$oids)
|
そのエクステンションがサポートされるかどうか判定します |
string|null getVendorName() |
vendorName を取得 |
string|null getVendorVersion() |
vendorVersion を取得 |
string|null getDsaName() |
dsaName を取得 |
string|null getStatisticsErrors() |
サーバ統計 "errors" を取得 |
string|null
getStatisticsSecurityErrors()
|
サーバ統計 "securityErrors" を取得 |
string|null
getStatisticsChainings()
|
サーバ統計 "chainings" を取得 |
string|null
getStatisticsReferralsReturned()
|
サーバ統計 "referralsReturned" を取得 |
string|null
getStatisticsExtendedOps()
|
サーバ統計 "extendedOps" を取得 |
string|null
getStatisticsAbandonOps()
|
サーバ統計 "abandonOps" を取得 |
string|null
getStatisticsWholeSubtreeSearchOps()
|
サーバ統計 "wholeSubtreeSearchOps" を取得 |
ベンダー固有のサブクラス全てで下記のメソッドが利用可能です。
Zend_Ldap_Node_Schema
は、
名前により属性にアクセスするための __get()
及び __isset()
マジック・プロパティー・アクセッサを含みます。
それらはそれぞれ、 Zend_Ldap_Node_Schema::getAttribute()
及び
Zend_Ldap_Node_Schema::existsAttribute()
を代理します。
__set()
及び __unset()
も実装されます。
しかし、 RootDSE ノードで認められない変更次第では
BadMethodCallException
をスローします。
さらに、属性に配列のようにアクセスするために
クラスは ArrayAccess
を実装します。
offsetSet()
及び offsetUnset()
も
明白な理由に起因する BadMethodCallException
をスローします。
表91 Zend_Ldap_Node_Schema API
メソッド | 説明 |
---|---|
Zend_Ldap_Dn getDn() |
Zend_Ldap_Dn として現行ノードの DN を取得します。 |
string getDnString(string $caseFold) |
文字列として現行ノードの DN を取得します |
array getDnArray(string $caseFold) |
配列として現行ノードの DN を取得します |
string getRdnString(string $caseFold) |
文字列として現行ノードの RDN を取得します |
array getRdnArray(string $caseFold) |
配列として現行ノードの RDN を取得します |
array getObjectClass() |
ノードの objectClass を返します |
string toString() |
現行ノードの DN を返します。
Zend_Ldap_Dn::getDnString() の代理です
|
string __toString() |
文字列表現にキャストします。
Zend_Ldap_Dn::toString() の代理です
|
array toArray(boolean
$includeSystemAttributes)
|
現行ノードの配列表現を返します。
もし $includeSystemAttributes が FALSE
(既定値は TRUE ) なら、システム固有の属性は配列から除去されます。
Zend_Ldap_Node_Schema::getAttributes() とは異なり、
結果の配列には キー 'dn' をもつ DN を含みます。
|
string toJson(boolean
$includeSystemAttributes)
|
Zend_Ldap_Node_Schema::toArray() を用いて
現行ノードの JSON 表現を返します。
|
array getData(boolean
$includeSystemAttributes)
|
ノードの属性を返します。 配列は属性全てをその内部フォーマットに含みます。(変換無し) |
boolean existsAttribute(string $name, boolean
$emptyExists)
|
与えられた属性が存在するかどうかチェックします。
もし $emptyExists が FALSE なら、
空の属性 (array() のみを含む) は、
FALSE を返す、存在しないものとして扱われます。
もし $emptyExists が true なら、
空の属性は TRUE を返す、存在するものとして扱われます。
この場合、属性の名前がキーの集合に欠落している場合のみ、
メソッドは FALSE を返します。
|
boolean attributeHasValue(string $name, mixed|array
$value)
|
与えられた値が属性に存在するかチェックします。
$value 内の値全てが属性に現れる場合のみ、
メソッドは TRUE を返します。
比較は厳格に行なわれます。(データ型を考慮します)
|
integer count() |
ノードの属性数を返します。 Countable を実装します。 |
mixed getAttribute(string $name, integer|null
$index)
|
LDAP 属性を取得します。データ変換は
Zend_Ldap_Attribute::getAttribute() を使って適用されます。
|
array getAttributes(boolean
$includeSystemAttributes)
|
ノードの属性全てを取得します。もし
$includeSystemAttributes が FALSE なら、
(既定は TRUE ) システム固有の属性は配列から除去されます。
|
array|integer getDateTimeAttribute(string $name,
integer|null $index)
|
LDAP の日付/時刻属性を取得します。データ変換は
Zend_Ldap_Attribute::getDateTimeAttribute() を使って適用されます。
|
Zend_Ldap_Node_Schema reload(Zend_Ldap
$ldap)
|
与えられた LDAP サーバから現行ノードの属性を再読み込みします。 |
Zend_Ldap_Node_Schema create(Zend_Ldap
$ldap)
|
Schema ノードを生成するファクトリー・メソッド |
array getAttributeTypes() |
属性のタイプを . の配列として取得します。 |
array getObjectClasses() |
オブジェクトクラスを
Zend_Ldap_Node_Schema_ObjectClass_Interface の配列として取得します。
|
表92 Zend_Ldap_Node_Schema_AttributeType_Interface API
メソッド | 説明 |
---|---|
string getName() |
属性名を取得します |
string getOid() |
属性の OID を取得します |
string getSyntax() |
属性の構文を取得します |
int|null getMaxLength() |
属性の最大長を取得します |
boolean isSingleValued() |
属性が単一の値かどうか返します |
string getDescription() |
属性の説明を取得します |
表93 Zend_Ldap_Node_Schema_ObjectClass_Interface API
メソッド | 説明 |
---|---|
string getName() |
objectClass の名前を返します |
string getOid() |
objectClass の OID を返します |
array getMustContain() |
この objectClass が含まなければいけない属性を返します |
array getMayContain() |
この objectClass が含むかもしれない属性を返します |
string getDescription() |
属性の説明を返します |
integer getType() |
objectClass のタイプを返します。
このメソッドは下記の値のうちの一つを返します。
|
array getParentClasses() |
このクラスの親の(複数の) objectClass を返します。 これは構造、抽象、補助 objectClass を含みます。 |
クラスが表現する属性のタイプ及びオブジェクトクラスは、
基礎となる LDAP ノード上の任意の属性にアクセスするための
いくつかのコアメソッドを提供する Zend_Ldap_Node_Schema_Item
を拡張します。
Zend_Ldap_Node_Schema_Item
は
名前により属性にアクセスするためのマジック・プロパティー・アクセッサ
__get()
及び __isset()
を含みます。
さらに、属性に配列のようにアクセスするために、
クラスは ArrayAccess
を実装します。
offsetSet()
及び offsetUnset()
は、
スキーマ情報ノードで認められない変更次第では
BadMethodCallException
をスローします。
表94 Zend_Ldap_Node_Schema_Item API
メソッド | 説明 |
---|---|
array getData() |
スキーマ情報ノードから基礎となる全てのデータを取得します。 |
integer count() |
スキーマ情報ノード内の属性数を返します。 Countable を実装します。 |
さらに、上記の共通メソッドが Zend_Ldap_Node_Schema_OpenLDAP
のインスタンスに適用されます。
表95 Zend_Ldap_Node_Schema_OpenLDAP API
メソッド | 説明 |
---|---|
array getLdapSyntaxes() |
LDAP 構文を取得します |
array getMatchingRules() |
一致するルールを取得します |
array getMatchingRuleUse() |
一致するルールの使用法を取得します |
表96 Zend_Ldap_Node_Schema_AttributeType_OpenLDAP API
メソッド | 説明 |
---|---|
Zend_Ldap_Node_Schema_AttributeType_OpenLdap|null
getParent()
|
もし存在すれば、継承ツリー内の親の属性タイプを返します |
表97 Zend_Ldap_Node_Schema_ObjectClass_OpenLDAP API
メソッド | 説明 |
---|---|
array getParents() |
もし存在すれば、継承ツリー内の(複数の)親オブジェクトクラスを返します
返される配列は、
Zend_Ldap_Node_Schema_ObjectClass_OpenLdap の配列です。
|
ActiveDirectory サーバ上でのスキーマ・ブラウジング
包括的探索ルーチンで返されるエントリーの数に関する Microsoft ActiveDirectory サーバでの、規制のため、 および、 ActiveDirectory スキーマ・リポジトリの構造のため、 スキーマ・ブラウジングは、現在 Microsoft ActiveDirectory サーバでは利用可能 ではありません。
Zend_Ldap_Node_Schema_ActiveDirectory
は、いかなる追加メソッドも提供しません。
表98 Zend_Ldap_Node_Schema_AttributeType_ActiveDirectory API
Zend_Ldap_Node_Schema_AttributeType_ActiveDirectory
は、いかなる追加メソッドも提供しません
|
表99 Zend_Ldap_Node_Schema_ObjectClass_ActiveDirectory API
Zend_Ldap_Node_Schema_ObjectClass_ActiveDirectory
は、いかなる追加メソッドも提供しません
|
表100 Zend_Ldif_Encoder API
メソッド | 説明 |
---|---|
array decode(string $string)
|
文字列 $string を LDIF 要素の配列にデコードします。
|
string encode(scalar|array|Zend_Ldap_Node
$value, array $options)
|
$value を LDIF 表現にエンコードします。
$options は下記のキーを含むであろう配列です:
|