PHP Class Phergie_Connection, phergie

Author: Phergie Development Team ([email protected])
Afficher le fichier Open project: phergie/phergie Class Usage Examples

Protected Properties

Свойство Type Description
$context array Stream context options
$encoding string Encoding method for the connection, defaults to ISO-8859-1 but can be set to UTF-8 if necessary
$host string Host to which the client will connect
$hostmask Phergie_Hostmask Hostmask for the connection
$nick string Nick that the client will use
$password string Password that the client will use
$port integer Port on which the client will connect, defaults to the standard IRC port
$realname string Realname that the client will use
$transport string Transport for the connection, defaults to tcp but can be set to ssl or variations thereof to connect over SSL
$username string Username that the client will use

Méthodes publiques

Méthode Description
__construct ( array $options = [] ) : void Constructor to initialize instance properties.
getContext ( ) : array Returns the stream context options in use.
getEncoding ( ) : string Returns the encoding in use by the connection.
getHost ( ) : string Returns the host to which the client will connect if it is set or emits an error if it is not set.
getHostmask ( ) : string Returns a hostmask that uniquely identifies the connection.
getNick ( ) : string Returns the nick that the client will use.
getPassword ( ) : string Returns the password that the client will use.
getPort ( ) : integer Returns the port on which the client will connect.
getRealname ( ) : string Returns the realname that the client will use.
getTransport ( ) : string Returns the transport in use by the connection.
getUsername ( ) : string Returns the username that the client will use.
setContext ( array $context ) : Phergie_Connection_Streams Sets the stream context options to use.
setEncoding ( string $encoding ) : Phergie_Connection Sets the encoding for the connection to use.
setHost ( string $host ) : Phergie_Connection Sets the host to which the client will connect.
setNick ( string $nick ) : Phergie_Connection Sets the nick that the client will use.
setOptions ( array $options ) : Phergie_Connection Sets multiple connection settings using an array.
setPassword ( string $password ) : Phergie_Connection Sets the password that the client will use.
setPort ( integer $port ) : Phergie_Connection Sets the port on which the client will connect.
setRealname ( string $realname ) : Phergie_Connection Sets the realname that the client will use.
setTransport ( string $transport ) : Phergie_Connection Sets the transport for the connection to use.
setUsername ( string $username ) : Phergie_Connection Sets the username that the client will use.

Méthodes protégées

Méthode Description
checkSetting ( string $setting ) : void Emits an error related to a required connection setting does not have value set for it.

Method Details

__construct() public méthode

Constructor to initialize instance properties.
public __construct ( array $options = [] ) : void
$options array Optional associative array of property values to initialize
Résultat void

checkSetting() protected méthode

Emits an error related to a required connection setting does not have value set for it.
protected checkSetting ( string $setting ) : void
$setting string Name of the setting
Résultat void

getContext() public méthode

Returns the stream context options in use.
public getContext ( ) : array
Résultat array Context options as they will be passed to stream_context_create()

getEncoding() public méthode

Returns the encoding in use by the connection.
public getEncoding ( ) : string
Résultat string Encoding (ex: ASCII, ISO-8859-1, UTF-8, etc.)

getHost() public méthode

Returns the host to which the client will connect if it is set or emits an error if it is not set.
public getHost ( ) : string
Résultat string

getHostmask() public méthode

Returns a hostmask that uniquely identifies the connection.
public getHostmask ( ) : string
Résultat string

getNick() public méthode

Returns the nick that the client will use.
public getNick ( ) : string
Résultat string

getPassword() public méthode

Returns the password that the client will use.
public getPassword ( ) : string
Résultat string

getPort() public méthode

Returns the port on which the client will connect.
public getPort ( ) : integer
Résultat integer

getRealname() public méthode

Returns the realname that the client will use.
public getRealname ( ) : string
Résultat string

getTransport() public méthode

Returns the transport in use by the connection.
public getTransport ( ) : string
Résultat string Transport (ex: tcp, ssl, etc.)

getUsername() public méthode

Returns the username that the client will use.
public getUsername ( ) : string
Résultat string

setContext() public méthode

Sets the stream context options to use.
public setContext ( array $context ) : Phergie_Connection_Streams
$context array Context options as they will be passed to stream_context_create()
Résultat Phergie_Connection_Streams Implements a fluent interface

setEncoding() public méthode

Sets the encoding for the connection to use.
public setEncoding ( string $encoding ) : Phergie_Connection
$encoding string Encoding to use (ex: ASCII, ISO-8859-1, UTF-8, etc.)
Résultat Phergie_Connection Provides a fluent interface

setHost() public méthode

Sets the host to which the client will connect.
public setHost ( string $host ) : Phergie_Connection
$host string Hostname
Résultat Phergie_Connection Provides a fluent interface

setNick() public méthode

Sets the nick that the client will use.
public setNick ( string $nick ) : Phergie_Connection
$nick string Nickname
Résultat Phergie_Connection Provides a fluent interface

setOptions() public méthode

Sets multiple connection settings using an array.
public setOptions ( array $options ) : Phergie_Connection
$options array Associative array of setting names mapped to corresponding values
Résultat Phergie_Connection Provides a fluent interface

setPassword() public méthode

Sets the password that the client will use.
public setPassword ( string $password ) : Phergie_Connection
$password string Password
Résultat Phergie_Connection Provides a fluent interface

setPort() public méthode

Sets the port on which the client will connect.
public setPort ( integer $port ) : Phergie_Connection
$port integer Port
Résultat Phergie_Connection Provides a fluent interface

setRealname() public méthode

Sets the realname that the client will use.
public setRealname ( string $realname ) : Phergie_Connection
$realname string Real name
Résultat Phergie_Connection Provides a fluent interface

setTransport() public méthode

Sets the transport for the connection to use.
public setTransport ( string $transport ) : Phergie_Connection
$transport string Transport (ex: tcp, ssl, etc.)
Résultat Phergie_Connection Provides a fluent interface

setUsername() public méthode

Sets the username that the client will use.
public setUsername ( string $username ) : Phergie_Connection
$username string Username
Résultat Phergie_Connection Provides a fluent interface

Property Details

$context protected_oe property

Stream context options
protected array $context
Résultat array

$encoding protected_oe property

Encoding method for the connection, defaults to ISO-8859-1 but can be set to UTF-8 if necessary
protected string $encoding
Résultat string

$host protected_oe property

Host to which the client will connect
protected string $host
Résultat string

$hostmask protected_oe property

Hostmask for the connection
protected Phergie_Hostmask $hostmask
Résultat Phergie_Hostmask

$nick protected_oe property

Nick that the client will use
protected string $nick
Résultat string

$password protected_oe property

Password that the client will use
protected string $password
Résultat string

$port protected_oe property

Port on which the client will connect, defaults to the standard IRC port
protected int $port
Résultat integer

$realname protected_oe property

Realname that the client will use
protected string $realname
Résultat string

$transport protected_oe property

Transport for the connection, defaults to tcp but can be set to ssl or variations thereof to connect over SSL
protected string $transport
Résultat string

$username protected_oe property

Username that the client will use
protected string $username
Résultat string