Permalink
Browse files

moved thrift loader out of config

  • Loading branch information...
1 parent f514253 commit 6b4f808644c9bd4022d2f6fcebcdffd1bf344d71 @mjpearson committed May 12, 2010
Showing with 14 additions and 14 deletions.
  1. +3 −11 config.php
  2. +9 −1 lib/loader.php
  3. +2 −2 lib/uuid/UUID.class.php
View
@@ -8,20 +8,12 @@
* @version 0.2
* @package pandra
*/
-//error_reporting(E_ALL);
-$GLOBALS['THRIFT_ROOT'] = dirname(__FILE__).'/thrift-php/';
-require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php';
-require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
-require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
-require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php';
-require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';
-
-require_once dirname(__FILE__).'/lib/loader.php';
-
define('MODEL_OUT_DIR', dirname(__FILE__).'/models/');
define('SCHEMA_PATH', dirname(__FILE__).'/schemas/');
define('THRIFT_PORT_DEFAULT', 9160);
define('DEFAULT_ROW_LIMIT', 10);
define('PERSIST_CONNECTIONS', FALSE); // TSocket Persistence
define('CASSANDRA_CONF_PATH', '/usr/local/src/apache-cassandra-0.6.1/conf/storage-conf.xml');
-?>
+
+require_once dirname(__FILE__).'/lib/loader.php';
+?>
View
@@ -10,6 +10,14 @@
* @version 0.2
* @package pandra
*/
+
+$GLOBALS['THRIFT_ROOT'] = dirname(__FILE__).'/../thrift-php/';
+require_once $GLOBALS['THRIFT_ROOT'].'/packages/cassandra/Cassandra.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/TFramedTransport.php';
+require_once $GLOBALS['THRIFT_ROOT'].'/transport/TBufferedTransport.php';
+
define('PANDRA_64', PHP_INT_SIZE == 8);
define('PANDRA_INSTALL_DIR', dirname(__FILE__));
function _pandraAutoLoad($className) {
@@ -45,4 +53,4 @@ function _pandraAutoLoad($className) {
PandraCore::setAPCAvailable(function_exists('apc_sma_info') && apc_sma_info() !== FALSE);
UUID::auto();
-?>
+?>
View
@@ -69,7 +69,7 @@ public static function v5() {
public static function register($pluginName) {
$className = 'Pandra'.self::$_pluginPfx.$pluginName;
- if (class_exists($className) && $className::isCapable()) {
+ if (class_exists($className) && call_user_func(array($className, 'isCapable'))) {
self::$_pluginRef = $className;
return TRUE;
}
@@ -100,4 +100,4 @@ public static function isBinary($uuid) {
return preg_match('/((?![\x20-\x7E]).)/', $uuid);
}
}
-?>
+?>

0 comments on commit 6b4f808

Please sign in to comment.