PHP 클래스 Phergie_Connection, phergie

저자: Phergie Development Team ([email protected])
파일 보기 프로젝트 열기: phergie/phergie 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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