Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php defined('SYSPATH') or die('No direct script access.');
- /**
- * Cassandra
- *
- * @package Cassandra
- * @author Jean-Nicolas Boulay Desjardins
- * @copyright (c) 2011 Jean-Nicolas Boulay Desjardins
- * @license http://www.opensource.org/licenses/isc-license.txt
- */
- class Kohana_CASSANDRA {
- public static $pool = NULL;
- public static function init()
- {
- echo '~Hey!~';
- require_once ('phpcassa/connection.php');
- require_once ('phpcassa/columnfamily.php');
- $config = Kohana::config('cassandra');
- $servers = $config['servers'];
- $keyspace = $config['keyspace'];
- self::$pool = new ConnectionPool($keyspace, $servers);
- }
- public static function selectColumnFamily($col_fam)
- {
- self::init();
- return new ColumnFamily(self::$pool, $col_fam);
- }
- } // End of Cassandra
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement