Erebot  latest
A modular IRC bot for PHP 5.3+
Erebot\Interfaces\Identity Interface Reference

Represents the identity of an IRC user. More...

+ Inheritance diagram for Erebot\Interfaces\Identity:

Public Member Functions

 __toString ()
 
 getHost ($c10n)
 
 getIdent ()
 
 getMask ($c10n)
 
 getNick ()
 

Public Attributes

const CANON_IPV4 = 4
 Use an IPv6 mapped IPv4 representation (eg. "::ffff:127.0.0.1").
 
const CANON_IPV6 = 6
 Use a pure IPv6 representation (eg. "::ffff:7f00:1").
 

Detailed Description

Represents the identity of an IRC user.

Definition at line 27 of file Identity.php.

Member Function Documentation

Erebot\Interfaces\Identity::__toString ( )

This method works like Erebot::Interfaces::Identity::getNick(), except that if no information is available on the user's nickname, it should return a very distinctive value. Eg. an appropriate return value in such a case could be '?'.

Return values
stringThis user's nickname or a distinctive value if it is not available.

Implemented in Erebot\Identity.

Erebot\Interfaces\Identity::getHost (   $c10n)

Returns the host of the user represented by this identity.

Parameters
opaque$c10nEither Erebot::Interfaces::Identity::CANON_IPV4 or Erebot::Interfaces::Identity::CANON_IPV6, indicating the type of IP canonicalization to use.
Return values
stringThis user's hostname or null if unavailable.

Implemented in Erebot\Identity.

Erebot\Interfaces\Identity::getIdent ( )

Returns the identity string of the user represented by this identity.

Return values
mixedThis user's identity string or NULL if unavailable.
Note
The name of this method is somewhat misleading, as it returns the "identity" as defined by the user in his/her client. This is not the same as the "identity" represented here (which contains additional information). To try to disambiguate, the term "identity string" has been used when referring to the user-defined identity.

Implemented in Erebot\Identity.

Erebot\Interfaces\Identity::getMask (   $c10n)

Returns a mask which can later be used to match against this user.

Parameters
opaque$c10nEither Erebot::Interfaces::Identity::CANON_IPV4 or Erebot::Interfaces::Identity::CANON_IPV6, indicating the type of IP canonicalization to use.
Return values
stringA mask matching against this user.
Note
Fields for which no value is available should be replaced with '*'. This can result in very generic masks (eg. "foo!*@*") if not enough information is known.

Implemented in Erebot\Identity.

Erebot\Interfaces\Identity::getNick ( )

Returns the nickname of the user represented by this identity.

Return values
mixedThis user's nickname or NULL if unavailable.

Implemented in Erebot\Identity.


The documentation for this interface was generated from the following file: