PHP 클래스 Phergie_Event_Request, phergie

상속: extends Phergie_Event_Abstract, implements ArrayAccess
파일 보기 프로젝트 열기: phergie/phergie 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$arguments array Arguments included with the message
$hostmask Phergie_Hostmask Hostmask representing the originating user, if applicable
$map array Mapping of event types to their named parameters
$rawData string Raw data sent by the server

공개 메소드들

메소드 설명
__call ( string $name, array $arguments ) : mixed Provides access to named parameters via virtual "getter" methods.
getArgument ( mixed $argument ) : string | null Returns a single specified argument for the request.
getArgumentMapping ( ) : array Returns a mapping of commands to their respective arguments.
getArguments ( ) : array Returns the arguments for the request.
getHostmask ( ) : Phergie_Event_Request | null Returns the hostmask representing the originating user.
getNick ( ) : string Returns the nick of the user who originated the event.
getRawData ( ) : string Returns the raw buffer sent from the server for the event.
getSource ( ) : string Returns the channel name if the event occurred in a channel or the user nick if the event was a private message directed at the bot by a user.
isFromServer ( ) : TRUE Returns whether or not the event originated from the server.
isFromUser ( ) : TRUE Returns whether or not the event originated from a user.
isInChannel ( ) : TRUE Returns whether or not the event occurred within a channel.
offsetExists ( string | integer $offset ) : boolean Checks to see if an event argument is assigned a value.
offsetGet ( string | integer $offset ) : string | null Returns the value of an event argument.
offsetSet ( string | integer $offset, string $value ) : void Sets the value of an event argument.
offsetUnset ( string | integer $offset ) : void Removes the value set for an event argument.
removeArgument ( mixed $argument ) : Phergie_Event_Request Removes an argument value from the request.
setArgument ( mixed $argument, string $value ) : Phergie_Event_Request Sets the value of a single argument for the request.
setArguments ( array $arguments ) : Phergie_Event_Request Sets the arguments for the request.
setHostmask ( Phergie_Hostmask $hostmask ) : Phergie_Event_Request Sets the hostmask representing the originating user.
setRawData ( string $buffer ) : Phergie_Event_Request Sets the raw buffer for the event.

보호된 메소드들

메소드 설명
isChannelName ( string $string ) : boolean Determines whether a given string is a valid IRC channel name.
resolveArgument ( mixed $argument ) : integer Resolves an argument specification to an integer position.

메소드 상세

__call() 공개 메소드

Provides access to named parameters via virtual "getter" methods.
public __call ( string $name, array $arguments ) : mixed
$name string Name of the method called
$arguments array Arguments passed to the method (should always be empty)
리턴 mixed Method return value

getArgument() 공개 메소드

Returns a single specified argument for the request.
public getArgument ( mixed $argument ) : string | null
$argument mixed Integer position (starting from 0) or the equivalent string name of the argument from self::$map
리턴 string | null Argument value or NULL if none is set

getArgumentMapping() 공개 정적인 메소드

Returns a mapping of commands to their respective arguments.
public static getArgumentMapping ( ) : array
리턴 array Associative array keyed by command referencing an associative array keyed by argument name referencing its position starting from 0

getArguments() 공개 메소드

Returns the arguments for the request.
public getArguments ( ) : array
리턴 array

getHostmask() 공개 메소드

Returns the hostmask representing the originating user.
public getHostmask ( ) : Phergie_Event_Request | null
리턴 Phergie_Event_Request | null Hostmask or NULL if none was set

getNick() 공개 메소드

Returns the nick of the user who originated the event.
public getNick ( ) : string
리턴 string

getRawData() 공개 메소드

Returns the raw buffer sent from the server for the event.
public getRawData ( ) : string
리턴 string

getSource() 공개 메소드

Returns the channel name if the event occurred in a channel or the user nick if the event was a private message directed at the bot by a user.
public getSource ( ) : string
리턴 string

isChannelName() 보호된 메소드

Determines whether a given string is a valid IRC channel name.
protected isChannelName ( string $string ) : boolean
$string string String to analyze
리턴 boolean TRUE if $string contains a valid channel name, FALSE otherwise

isFromServer() 공개 메소드

Returns whether or not the event originated from the server.
public isFromServer ( ) : TRUE
리턴 TRUE if the event is from the server, FALSE otherwise

isFromUser() 공개 메소드

Returns whether or not the event originated from a user.
public isFromUser ( ) : TRUE
리턴 TRUE if the event is from a user, FALSE otherwise

isInChannel() 공개 메소드

Returns whether or not the event occurred within a channel.
public isInChannel ( ) : TRUE
리턴 TRUE if the event is in a channel, FALSE otherwise

offsetExists() 공개 메소드

Checks to see if an event argument is assigned a value.
또한 보기: ArrayAccess::offsetExists()
public offsetExists ( string | integer $offset ) : boolean
$offset string | integer Argument name or position beginning from 0
리턴 boolean TRUE if the argument has a value, FALSE otherwise

offsetGet() 공개 메소드

Returns the value of an event argument.
또한 보기: ArrayAccess::offsetGet()
public offsetGet ( string | integer $offset ) : string | null
$offset string | integer Argument name or position beginning from 0
리턴 string | null Argument value or NULL if none is set

offsetSet() 공개 메소드

Sets the value of an event argument.
또한 보기: ArrayAccess::offsetSet()
public offsetSet ( string | integer $offset, string $value ) : void
$offset string | integer Argument name or position beginning from 0
$value string New argument value
리턴 void

offsetUnset() 공개 메소드

Removes the value set for an event argument.
또한 보기: ArrayAccess::offsetUnset()
public offsetUnset ( string | integer $offset ) : void
$offset string | integer Argument name or position beginning from 0
리턴 void

removeArgument() 공개 메소드

Removes an argument value from the request.
public removeArgument ( mixed $argument ) : Phergie_Event_Request
$argument mixed Integer position (starting from 0) or the equivalent string name of the argument from self::$map
리턴 Phergie_Event_Request Provides a fluent interface

resolveArgument() 보호된 메소드

Resolves an argument specification to an integer position.
protected resolveArgument ( mixed $argument ) : integer
$argument mixed Integer position (starting from 0) or the equivalent string name of the argument from self::$map
리턴 integer Integer position of the argument

setArgument() 공개 메소드

Sets the value of a single argument for the request.
public setArgument ( mixed $argument, string $value ) : Phergie_Event_Request
$argument mixed Integer position (starting from 0) or the equivalent string name of the argument from self::$map
$value string Value to assign to the argument
리턴 Phergie_Event_Request Provides a fluent interface

setArguments() 공개 메소드

Sets the arguments for the request.
public setArguments ( array $arguments ) : Phergie_Event_Request
$arguments array Request arguments
리턴 Phergie_Event_Request Provides a fluent interface

setHostmask() 공개 메소드

Sets the hostmask representing the originating user.
public setHostmask ( Phergie_Hostmask $hostmask ) : Phergie_Event_Request
$hostmask Phergie_Hostmask User hostmask
리턴 Phergie_Event_Request Provides a fluent interface

setRawData() 공개 메소드

Sets the raw buffer for the event.
public setRawData ( string $buffer ) : Phergie_Event_Request
$buffer string Raw event buffer
리턴 Phergie_Event_Request Provides a fluent interface

프로퍼티 상세

$arguments 보호되어 있는 프로퍼티

Arguments included with the message
protected array $arguments
리턴 array

$hostmask 보호되어 있는 프로퍼티

Hostmask representing the originating user, if applicable
protected Phergie_Hostmask $hostmask
리턴 Phergie_Hostmask

$map 보호되어 있는 정적으로 프로퍼티

Mapping of event types to their named parameters
protected static array $map
리턴 array

$rawData 보호되어 있는 프로퍼티

Raw data sent by the server
protected string $rawData
리턴 string