PHP Класс Phergie_Connection, phergie

Автор: Phergie Development Team ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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

Открытые методы

Метод Описание
__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.

Защищенные методы

Метод Описание
checkSetting ( string $setting ) : void Emits an error related to a required connection setting does not have value set for it.

Описание методов

__construct() публичный Метод

Constructor to initialize instance properties.
public __construct ( array $options = [] ) : void
$options array Optional associative array of property values to initialize
Результат void

checkSetting() защищенный Метод

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
Результат void

getContext() публичный Метод

Returns the stream context options in use.
public getContext ( ) : array
Результат array Context options as they will be passed to stream_context_create()

getEncoding() публичный Метод

Returns the encoding in use by the connection.
public getEncoding ( ) : string
Результат string Encoding (ex: ASCII, ISO-8859-1, UTF-8, etc.)

getHost() публичный Метод

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
Результат string

getHostmask() публичный Метод

Returns a hostmask that uniquely identifies the connection.
public getHostmask ( ) : string
Результат string

getNick() публичный Метод

Returns the nick that the client will use.
public getNick ( ) : string
Результат string

getPassword() публичный Метод

Returns the password that the client will use.
public getPassword ( ) : string
Результат string

getPort() публичный Метод

Returns the port on which the client will connect.
public getPort ( ) : integer
Результат integer

getRealname() публичный Метод

Returns the realname that the client will use.
public getRealname ( ) : string
Результат string

getTransport() публичный Метод

Returns the transport in use by the connection.
public getTransport ( ) : string
Результат string Transport (ex: tcp, ssl, etc.)

getUsername() публичный Метод

Returns the username that the client will use.
public getUsername ( ) : string
Результат string

setContext() публичный Метод

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()
Результат Phergie_Connection_Streams Implements a fluent interface

setEncoding() публичный Метод

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.)
Результат Phergie_Connection Provides a fluent interface

setHost() публичный Метод

Sets the host to which the client will connect.
public setHost ( string $host ) : Phergie_Connection
$host string Hostname
Результат Phergie_Connection Provides a fluent interface

setNick() публичный Метод

Sets the nick that the client will use.
public setNick ( string $nick ) : Phergie_Connection
$nick string Nickname
Результат Phergie_Connection Provides a fluent interface

setOptions() публичный Метод

Sets multiple connection settings using an array.
public setOptions ( array $options ) : Phergie_Connection
$options array Associative array of setting names mapped to corresponding values
Результат Phergie_Connection Provides a fluent interface

setPassword() публичный Метод

Sets the password that the client will use.
public setPassword ( string $password ) : Phergie_Connection
$password string Password
Результат Phergie_Connection Provides a fluent interface

setPort() публичный Метод

Sets the port on which the client will connect.
public setPort ( integer $port ) : Phergie_Connection
$port integer Port
Результат Phergie_Connection Provides a fluent interface

setRealname() публичный Метод

Sets the realname that the client will use.
public setRealname ( string $realname ) : Phergie_Connection
$realname string Real name
Результат Phergie_Connection Provides a fluent interface

setTransport() публичный Метод

Sets the transport for the connection to use.
public setTransport ( string $transport ) : Phergie_Connection
$transport string Transport (ex: tcp, ssl, etc.)
Результат Phergie_Connection Provides a fluent interface

setUsername() публичный Метод

Sets the username that the client will use.
public setUsername ( string $username ) : Phergie_Connection
$username string Username
Результат Phergie_Connection Provides a fluent interface

Описание свойств

$context защищенное свойство

Stream context options
protected array $context
Результат array

$encoding защищенное свойство

Encoding method for the connection, defaults to ISO-8859-1 but can be set to UTF-8 if necessary
protected string $encoding
Результат string

$host защищенное свойство

Host to which the client will connect
protected string $host
Результат string

$hostmask защищенное свойство

Hostmask for the connection
protected Phergie_Hostmask $hostmask
Результат Phergie_Hostmask

$nick защищенное свойство

Nick that the client will use
protected string $nick
Результат string

$password защищенное свойство

Password that the client will use
protected string $password
Результат string

$port защищенное свойство

Port on which the client will connect, defaults to the standard IRC port
protected int $port
Результат integer

$realname защищенное свойство

Realname that the client will use
protected string $realname
Результат string

$transport защищенное свойство

Transport for the connection, defaults to tcp but can be set to ssl or variations thereof to connect over SSL
protected string $transport
Результат string

$username защищенное свойство

Username that the client will use
protected string $username
Результат string