diff --git a/Classes/Client/BotClient.php b/Classes/Client/BotClient.php index 6b7bae0..5f9755c 100644 --- a/Classes/Client/BotClient.php +++ b/Classes/Client/BotClient.php @@ -10,7 +10,7 @@ class Client_BotClient extends Client_AbstractClient { /** * Default constructor. */ - function __construct() { + public function __construct() { } diff --git a/Classes/Client/ClientManager.php b/Classes/Client/ClientManager.php index 54a446b..9eaf70a 100644 --- a/Classes/Client/ClientManager.php +++ b/Classes/Client/ClientManager.php @@ -43,7 +43,7 @@ class Client_ClientManager { * Default constructor. * @return void */ - function __construct() { + public function __construct() { $this->connectionPool = new Connection_ConnectionPool(); $this->clientPool = array(); $this->registeredProtocols = array(); @@ -55,7 +55,7 @@ class Client_ClientManager { * Default destructor. Closes connections before being killed. * @return void */ - function __destruct() { + public function __destruct() { unset($this->clientPool); unset($this->connectionPool); } diff --git a/Classes/Client/IrcClient.php b/Classes/Client/IrcClient.php index ce44341..57d7f71 100644 --- a/Classes/Client/IrcClient.php +++ b/Classes/Client/IrcClient.php @@ -7,18 +7,41 @@ */ class Client_IrcClient extends Client_AbstractClient { + /** + * @var boolean + */ protected $got_001; + + /** + * @var boolean + */ protected $joined; + + /** + * @var boolean + */ protected $authed; + + /** + * @var string + */ protected $nick; + + /** + * @var array + */ protected $channels; + + /** + * @var int + */ protected $lines; /** * Default constructor. * @return void */ - function __construct() { + public function __construct() { $this->nick = "Serena"; $this->channels = array(); $this->resetConnectionStatus(); diff --git a/Classes/Connection/ConnectionHandler.php b/Classes/Connection/ConnectionHandler.php index ef4ea5e..d99b29c 100644 --- a/Classes/Connection/ConnectionHandler.php +++ b/Classes/Connection/ConnectionHandler.php @@ -87,7 +87,7 @@ class Connection_ConnectionHandler { * @param $linebreak * @return void */ - function __construct($socket, $id, $group = "", $protocol = "") { + public function __construct($socket, $id, $group = "", $protocol = "") { $this->buffer_incoming = new Misc_Buffer(); $this->buffer_outgoing = new Misc_Buffer(); $this->socketHandler = new Socket_SocketHandler($socket); @@ -105,7 +105,7 @@ class Connection_ConnectionHandler { * Calls parent destructor. * @return void */ - function __destruct() { + public function __destruct() { unset($this->socketHandler); } diff --git a/Classes/Connection/ConnectionPool.php b/Classes/Connection/ConnectionPool.php index 3b69156..eb66cb2 100644 --- a/Classes/Connection/ConnectionPool.php +++ b/Classes/Connection/ConnectionPool.php @@ -28,7 +28,7 @@ class Connection_ConnectionPool { * Creates an Instance of SocketPool * @return void */ - function __construct() { + public function __construct() { $this->connectionHandlers = array(); $this->socketPool = new Socket_SocketPool(); $this->nextID = 1; @@ -38,7 +38,7 @@ class Connection_ConnectionPool { * Destroys the SocketPool * @return void */ - function __destruct() { + public function __destruct() { unset($this->socketPool); } diff --git a/Classes/Exception/GeneralException.php b/Classes/Exception/GeneralException.php index 172fe80..90da108 100644 --- a/Classes/Exception/GeneralException.php +++ b/Classes/Exception/GeneralException.php @@ -13,7 +13,7 @@ class Exception_GeneralException extends Exception { * @param string $message * @param int $code */ - function __construct($message = "", $code = 0) { + public function __construct($message = "", $code = 0) { if ($message === "") { throw new $this('Unknown '. get_class($this)); } diff --git a/Classes/Misc/Buffer.php b/Classes/Misc/Buffer.php index 96dd75a..e101d12 100644 --- a/Classes/Misc/Buffer.php +++ b/Classes/Misc/Buffer.php @@ -26,7 +26,7 @@ class Misc_Buffer { * @param $linebreak * @return void */ - function __construct($linebreak = "") { + public function __construct($linebreak = "") { $this->buffer = ""; $this->linebreak = $linebreak; } diff --git a/Classes/Protocol/AbstractProtocolContentObject.php b/Classes/Protocol/AbstractProtocolContentObject.php index 519f2a2..ff04880 100644 --- a/Classes/Protocol/AbstractProtocolContentObject.php +++ b/Classes/Protocol/AbstractProtocolContentObject.php @@ -20,7 +20,7 @@ abstract class Protocol_AbstractProtocolContentObject { * Sets the raw data. * @return void */ - function __construct($rawData) { + public function __construct($rawData) { $this->rawData = $rawData; } diff --git a/Classes/Protocol/AbstractProtocolHandler.php b/Classes/Protocol/AbstractProtocolHandler.php index 33ce0e7..98c325f 100644 --- a/Classes/Protocol/AbstractProtocolHandler.php +++ b/Classes/Protocol/AbstractProtocolHandler.php @@ -36,7 +36,7 @@ abstract class Protocol_AbstractProtocolHandler { * Calls createBuffers() * @return void */ - function __construct() { + public function __construct() { $this->createBuffers(); } diff --git a/Classes/Socket/SocketHandler.php b/Classes/Socket/SocketHandler.php index 737503b..a041596 100644 --- a/Classes/Socket/SocketHandler.php +++ b/Classes/Socket/SocketHandler.php @@ -34,7 +34,7 @@ class Socket_SocketHandler { * @param ressource $socket * @return void */ - function __construct($socket) { + public function __construct($socket) { if(is_resource($socket) === FALSE) throw new Exception_SocketException("Invalid socket ressource!", 1289663108); $this->socket = $socket; $this->is_bound = FALSE; @@ -46,7 +46,7 @@ class Socket_SocketHandler { * Destructor. Closes socket. * @return void */ - function __destruct() { + public function __destruct() { $this->close(); } diff --git a/Classes/Socket/SocketPool.php b/Classes/Socket/SocketPool.php index 8cc3cfe..9f5d5f5 100644 --- a/Classes/Socket/SocketPool.php +++ b/Classes/Socket/SocketPool.php @@ -17,7 +17,7 @@ class Socket_SocketPool { * Creates sockets. * @return void */ - function __construct() { + public function __construct() { $this->sockets = array(); } @@ -25,7 +25,7 @@ class Socket_SocketPool { * Closes all connections. * @return void */ - function __destruct() { + public function __destruct() { unset($this->sockets); }