Permalink
Browse files

fixed #30

  • Loading branch information...
1 parent 84ead38 commit 4893f8de4691888f8b7d395fb75d51fc8930ad4f @mjpearson committed Apr 3, 2010
Showing with 9 additions and 3 deletions.
  1. +2 −0 config.php
  2. +7 −3 lib/Core.class.php
View
2 config.php
@@ -22,6 +22,8 @@
define('THRIFT_PORT_DEFAULT', 9160);
+define('PANDRA_64', PHP_INT_SIZE == 8);
+
// horrendous autoloader in the absense of namespace
function _pandraAutoLoad($className) {
View
10 lib/Core.class.php
@@ -218,7 +218,7 @@ static public function connect($connectionID, $host, $poolName = self::DEFAULT_P
self::$_socketPool[$poolName][$connectionID] = array(
'transport' => $transport,
'client' => new CassandraClient(
- (PHP_INT_SIZE == 8 &&
+ (PANDRA_64 &&
function_exists("thrift_protocol_write_binary") ?
new TBinaryProtocolAccelerated($transport) :
new TBinaryProtocol($transport)))
@@ -394,7 +394,7 @@ static public function getConsistency($consistencyLevel = NULL) {
* consistency mutator
* @param int $consistencyLevel new consistency level
*/
- static public function setConsistency(int $consistencyLevel) {
+ static public function setConsistency($consistencyLevel) {
self::$_consistencyLevel = $consistencyLevel;
}
@@ -418,7 +418,7 @@ static public function loadConfigXML() {
static public function getTime() {
// use microtime where possible
// @todo patch thrift .so
- if (PHP_INT_SIZE == 8 || !function_exists("thrift_protocol_write_binary")) {
+ if (PANDRA_64 || (!PANDRA_64 && !function_exists("thrift_protocol_write_binary"))) {
return round(microtime(true) * 1000, 3);
}
return time();
@@ -684,7 +684,11 @@ static public function getRangeKeys($keySpace,
/**
* Grabs locally defined columnfamilies (debug tool)
*/
+
/*
+ * @TODO!!!!!!!
+ *
+ *
static public function getConfColumnFamilies() {
$conf = self::loadConfigXML();

0 comments on commit 4893f8d

Please sign in to comment.