--- /dev/null
+<?php
+/**
+ * @category Horde
+ * @package Scribe
+ */
+
+/**
+ * @category Horde
+ * @package Scribe
+ */
+class Horde_Scribe_Client implements Horde_Scribe
+{
+ /**
+ * @var TFramedTransport
+ */
+ private $_transport;
+
+ /**
+ * @var scribeClient
+ */
+ private $_client;
+
+ public function connect($host = 'localhost', $port = 1463)
+ {
+ $socket = new TSocket($host, $port, true);
+ $this->_transport = new TFramedTransport($socket);
+ $protocol = new TBinaryProtocol($this->_transport, false, false);
+ $this->_client = new scribeClient($protocol, $protocol);
+ }
+
+ public function log($category, $message)
+ {
+ $this->logMulti(array($this->makeEntry($category, $message)));
+ }
+
+ public function logMulti(array $messages)
+ {
+ $this->_transport->open();
+ $this->_client->Log($messages);
+ $this->_transport->close();
+ }
+
+ public function makeEntry($category, $message)
+ {
+ return new LogEntry(array('category' => $category, 'message' => $message));
+ }
+}
<dir name="/">
<dir name="lib">
<dir name="Horde">
+ <dir name="Scribe">
+ <file name="Client.php" role="php" />
+ </dir> <!-- /lib/Horde/Scribe -->
<file name="Scribe.php" role="php" />
<dir name="Thrift">
<dir name="thrift_root">
</dependencies>
<phprelease>
<filelist>
+ <install name="lib/Horde/Scribe/Client.php" as="Horde/Scribe/Client.php" />
<install name="lib/Horde/Scribe.php" as="Horde/Scribe.php" />
<install name="lib/Horde/Thrift/thrift_root/packages/scribe/scribe_types.php" as="Horde/Thrift/thrift_root/packages/scribe/scribe_types.php" />
<install name="lib/Horde/Thrift/thrift_root/scribe.php" as="Horde/Thrift/thrift_root/scribe.php" />