[TASK] Updated variable names to lowerCamelCase.
This commit is contained in:
1 parent
78866ed149
commit
df030e453d
7 files changed
+103
-103
No files matched your search
@@ -15,18 +15,18 @@ abstract class Protocol_AbstractProtocolHandler {
|
||||
* Buffer for data that was received by the Client.
|
||||
* @var Misc_Buffer
|
||||
*/
|
||||
protected $buffer_incoming;
|
||||
protected $bufferIncoming;
|
||||
|
||||
/**
|
||||
* Buffer for data that will be sent by the Client.
|
||||
* @var Misc_Buffer
|
||||
*/
|
||||
protected $buffer_outgoing;
|
||||
protected $bufferOutgoing;
|
||||
|
||||
/**
|
||||
* This function will be called by the constructor.
|
||||
* It will create the necessary instances of Misc_Buffer and
|
||||
* put them in $buffer_incoming and $buffer_outgoing.
|
||||
* put them in $bufferIncoming and $bufferOutgoing.
|
||||
* @return void
|
||||
*/
|
||||
abstract public function createBuffers();
|
||||
@@ -49,7 +49,7 @@ abstract class Protocol_AbstractProtocolHandler {
|
||||
|
||||
/**
|
||||
* Main worker function of the ProtocolHandler.
|
||||
* Will fetch data from the buffer_incoming, process it,
|
||||
* Will fetch data from the bufferIncoming, process it,
|
||||
* and create a ProtocolContentObject out of it that will be returned to the client.
|
||||
* @return mixed instance of Protocol_AbstractProtocolContentObject
|
||||
*/
|
||||
@@ -61,7 +61,7 @@ abstract class Protocol_AbstractProtocolHandler {
|
||||
* @return void
|
||||
*/
|
||||
public function pushRawData($rawData) {
|
||||
$this->buffer_incoming->addData($rawData);
|
||||
$this->bufferIncoming->addData($rawData);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,7 +69,7 @@ abstract class Protocol_AbstractProtocolHandler {
|
||||
* @return string
|
||||
*/
|
||||
public function getRawData() {
|
||||
return $this->buffer_outgoing->getAllBufferContents();
|
||||
return $this->bufferOutgoing->getAllBufferContents();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -13,8 +13,8 @@ class Protocol_BotProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
*/
|
||||
public function createBuffers() {
|
||||
$linebreak = "\r\n";
|
||||
$this->buffer_incoming = new Misc_Buffer($linebreak);
|
||||
$this->buffer_outgoing = new Misc_Buffer($linebreak);
|
||||
$this->bufferIncoming = new Misc_Buffer($linebreak);
|
||||
$this->bufferOutgoing = new Misc_Buffer($linebreak);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -23,7 +23,7 @@ class Protocol_BotProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
* @return Protocol_BotProtocolContentObject
|
||||
*/
|
||||
public function work() {
|
||||
$data = $this->buffer_incoming->getNextLine();
|
||||
$data = $this->bufferIncoming->getNextLine();
|
||||
return new Protocol_BotProtocolContentObject($data);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ class Protocol_BotProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
* @return boolean
|
||||
*/
|
||||
public function canWork() {
|
||||
return $this->buffer_incoming->hasLines();
|
||||
return $this->bufferIncoming->hasLines();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,7 @@ class Protocol_BotProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
* @return void
|
||||
*/
|
||||
public function sendRaw($data) {
|
||||
$this->buffer_outgoing->addData($data);
|
||||
$this->bufferOutgoing->addData($data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@ class Protocol_IrcProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
*/
|
||||
public function createBuffers() {
|
||||
$this->linebreak = "\n";
|
||||
$this->buffer_incoming = new Misc_Buffer($this->linebreak);
|
||||
$this->buffer_outgoing = new Misc_Buffer($this->linebreak);
|
||||
$this->bufferIncoming = new Misc_Buffer($this->linebreak);
|
||||
$this->bufferOutgoing = new Misc_Buffer($this->linebreak);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -31,7 +31,7 @@ class Protocol_IrcProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
* @throws Exception_GeneralException
|
||||
*/
|
||||
public function work() {
|
||||
$data = $this->buffer_incoming->getNextLine();
|
||||
$data = $this->bufferIncoming->getNextLine();
|
||||
//create contentObject and set the raw data.
|
||||
$contentObject = new Protocol_IrcProtocolContentObject($data);
|
||||
|
||||
@@ -176,7 +176,7 @@ class Protocol_IrcProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
* @return boolean
|
||||
*/
|
||||
public function canWork() {
|
||||
return $this->buffer_incoming->hasLines();
|
||||
return $this->bufferIncoming->hasLines();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -187,7 +187,7 @@ class Protocol_IrcProtocolHandler extends Protocol_AbstractProtocolHandler {
|
||||
* @return void
|
||||
*/
|
||||
public function sendRaw($data) {
|
||||
$this->buffer_outgoing->addData($data . $this->linebreak);
|
||||
$this->bufferOutgoing->addData($data . $this->linebreak);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user