/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * To test multiple nodes, add their connection strings here * * @access protected */ protected function setUp() { PandraCore::auto('localhost'); $this->parent = new PandraColumnFamily(); $this->parent->setKeySpace('Keyspace1'); $this->parent->setName('Standard1'); $this->obj = new PandraColumn($this->columnName); }
/** * Sets up the fixture, for example, opens a network connection. * This method is called before a test is executed. * * To test multiple nodes, add their connection strings here * * @access protected */ protected function setUp() { PandraCore::auto('localhost'); }
<?php /** * (c) 2010 phpgrease.net * * @author Michael Pearson <*****@*****.**> */ /** * Example dynamic Address Book construct using Column Family (Super) and Super Columns */ error_reporting(E_ALL); require_once dirname(__FILE__) . '/../config.php'; if (!PandraCore::auto('localhost')) { die(PandraCore::$lastError); } // hard code the row key for this example $keyID = 'PAddressStore'; // default keyspace in storage.conf $keySpace = 'Keyspace1'; // default Super Column name $columnFamilyName = 'Super1'; class Address extends PandraSuperColumn { public function init() { $this->addColumn('city', 'string'); $this->addColumn('street', 'string'); $this->addColumn('zip', 'int'); } } class Addresses extends PandraSuperColumnFamily