/**
* A Constructor for this exception
*
- * @param $listenerInstance An instance of a Listenable class
+ * @param $protocolInstance An instance of a ProtocolHandler class
* @param $code Error code
* @return void
*/
- public function __construct (Listenable $listenerInstance, $code) {
+ public function __construct (ProtocolHandler $protocolInstance, $code) {
// Construct the message
$message = sprintf("[%s:] Requested socket is not yet registered.",
- $listenerInstance->__toString()
+ $protocolInstance->__toString()
);
// Call parent exception constructor
* Checks wether given socket resource is registered. If $socketResource is
* false only the instance will be checked.
*
- * @param $listenerInstance An instance of a Listenable class
+ * @param $protocolInstance An instance of a ProtocolHandler class
* @param $socketResource A valid socket resource
* @return $isRegistered Wether the given socket resource is registered
*/
- function isSocketRegistered (Listenable $listenerInstance, $socketResource);
+ function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource);
/**
* Registeres given socket for listener or throws an exception if it is already registered
*
- * @param $listenerInstance An instance of a Listenable class
+ * @param $protocolInstance An instance of a ProtocolHandler class
* @param $socketResource A valid socket resource
* @return void
* @throws SocketAlreadyRegisteredException If the given socket is already registered
*/
- function registerSocket (Listenable $listenerInstance, $socketResource);
+ function registerSocket (ProtocolHandler $protocolInstance, $socketResource);
/**
* Getter for given listener's socket resource
*
- * @param $listenerInstance An instance of a Listenable class
+ * @param $protocolInstance An instance of a ProtocolHandler class
* @return $socketResource A valid socket resource
* @throws NoSocketRegisteredException If the requested socket is not registered
*/
- function getSocketResource (Listenable $listenerInstance);
+ function getSocketResource (ProtocolHandler $protocolInstance);
}
// [EOF]
* Checks wether given socket resource is registered. If $socketResource is
* false only the instance will be checked.
*
- * @param $listenerInstance An instance of a Listenable class
+ * @param $protocolInstance An instance of a ProtocolHandler class
* @param $socketResource A valid socket resource
* @return $isRegistered Wether the given socket resource is registered
*/
- public function isSocketRegistered (Listenable $listenerInstance, $socketResource) {
+ public function isSocketRegistered (ProtocolHandler $protocolInstance, $socketResource) {
$this->partialStub('Not yet implemented.');
}
/**
* Registeres given socket for listener or throws an exception if it is already registered
*
- * @param $listenerInstance An instance of a Listenable class
+ * @param $protocolInstance An instance of a ProtocolHandler class
* @param $socketResource A valid socket resource
* @throws SocketAlreadyRegisteredException If the given socket is already registered
* @return void
*/
- public function registerSocket (Listenable $listenerInstance, $socketResource) {
+ public function registerSocket (ProtocolHandler $protocolInstance, $socketResource) {
// Is the socket already registered?
- if ($this->isSocketRegistered($listenerInstance, $socketResource)) {
+ if ($this->isSocketRegistered($protocolInstance, $socketResource)) {
// Throw the exception
- throw new SocketAlreadyRegisteredException($listenerInstance, BaseListener::EXCEPTION_SOCKET_ALREADY_REGISTERED);
+ throw new SocketAlreadyRegisteredException($protocolInstance, BaseListener::EXCEPTION_SOCKET_ALREADY_REGISTERED);
} // END - if
$this->partialStub('Not yet implemented.');
/**
* Getter for given listener's socket resource
*
- * @param $listenerInstance An instance of a Listenable class
+ * @param $protocolInstance An instance of a ProtocolHandler class
* @return $socketResource A valid socket resource
* @throws NoSocketRegisteredException If the requested socket is not registered
*/
- public function getSocketResource (Listenable $listenerInstance) {
+ public function getSocketResource (ProtocolHandler $protocolInstance) {
// The socket must be registered before we can return it
- if (!$this->isSocketRegistered($listenerInstance, false)) {
+ if (!$this->isSocketRegistered($protocolInstance, false)) {
// Throw the exception
- throw new NoSocketRegisteredException ($listenerInstance, self::SOCKET_NOT_REGISTERED);
+ throw new NoSocketRegisteredException ($protocolInstance, self::SOCKET_NOT_REGISTERED);
} // END - if
$this->partialStub('Not yet implemented.');