Message
API reference › LDAP › exception › Message
Defines LDAP exception message templates.
Use Message::getMessage() to format the template with sprintf() arguments.
| Case | Value | Description |
|---|---|---|
CONNECTION_MANAGER_CHANGED | 'Unregister this directory before changing the LDAP connection manager.' | Error when the LdapRecord connection manager changed while this directory still owns registrations. |
CONNECTION_NAME_ALREADY_REGISTERED | 'An LDAP connection with this name is already registered.' | Error when another component already registered the connection name. |
CONNECTION_NAME_INVALID | 'Specify a valid LDAP connection name.' | Error when a connection name is not a string of letters, digits, underscores or hyphens starting with a letter. |
DIRECTORY_UNAVAILABLE | 'The directory operation could not be completed.' | Error when a directory operation fails; it carries no backend diagnostics or credentials. |
ENDPOINT_INVALID | 'Specify a valid LDAP endpoint, | Error when the host, port, timeout, base DN, credentials or writable flag of an endpoint is invalid. |
ENDPOINT_MUST_BE_ARRAY | 'Specify LDAP endpoint settings as an array.' | Error when the settings of a connection are not an array. |
LDAP_ATTRIBUTE_NAME_INVALID | 'Map only explicit LDAP attribute names.' | Error when a synchronization mapping names something other than one explicit LDAP attribute. |
MEMBERSHIP_MODELS_INVALID | 'Use persisted models of the same schema on an enabled LDAP write connection.' | Error when the group and user are not persisted models of one schema on a writable connection. |
MEMBERSHIP_MODELS_NOT_ON_WRITE_CONNECTION | 'The models must resolve to the registered LDAP write connection.' | Error when the group or user resolves to a connection other than the registered write connection. |
SYNC_SOURCE_INVALID | 'Sync requires a mapped user query on a named LDAP read connection and a positive ' . 'page size.' | Error when the synchronization query, mapping or page size is invalid. |
VERIFIER_HOST_INVALID | 'Specify one LDAP hostname without a scheme or port.' | Error when the password verifier host is not a bare hostname. |
VERIFIER_PORT_OR_TIMEOUT_INVALID | 'Specify a valid LDAP port and a positive network timeout.' | Error when the password verifier port or timeout is out of range. |
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
getMessage() | Returns the formatted message string for the error case. | Message |
Method details
Section titled “Method details”getMessage()
Section titled “getMessage() ”public function getMessage(int|string ...$argument): stringReturns the formatted message string for the error case.
Parameters
| Parameter | Type | Description |
|---|---|---|
...$argument | int| | Values to insert into the message template. |
Returns
string