Skip to content

Commit

Permalink
Move IMessagePublisher to a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
msabramo committed Apr 6, 2012
1 parent 6482d69 commit c4b316d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 21 deletions.
14 changes: 14 additions & 0 deletions src/Gelf/IMessagePublisher.php
@@ -0,0 +1,14 @@
<?php

namespace Gelf;

interface IMessagePublisher {
/**
* Publishes a Message, returns false if an error occured during write
*
* @throws UnexpectedValueException
* @param unknown_type $message
* @return boolean
*/
public function publish(Message $message);
}
21 changes: 0 additions & 21 deletions src/Gelf/MessagePublisher.php
Expand Up @@ -2,27 +2,6 @@

namespace Gelf;

interface IMessagePublisher {
/**
* Creates a new publisher that sends errors to a Graylog2 server via UDP
*
* @throws \InvalidArgumentException
* @param string $hostname
* @param integer $port
* @param integer $chunkSize
*/
public function __construct($hostname, $port = self::GRAYLOG2_DEFAULT_PORT, $chunkSize = self::CHUNK_SIZE_WAN);

/**
* Publishes a Message, returns false if an error occured during write
*
* @throws UnexpectedValueException
* @param unknown_type $message
* @return boolean
*/
public function publish(Message $message);
}

class MessagePublisher implements IMessagePublisher {
/**
* @var integer
Expand Down

0 comments on commit c4b316d

Please sign in to comment.