Basho\Riak::getActiveNode PHP Method

getActiveNode() public method

public getActiveNode ( ) : Node
return Basho\Riak\Node
    public function getActiveNode()
    {
        $nodes = $this->getNodes();
        return $nodes[$this->getActiveNodeIndex()];
    }

Usage Example

示例#1
0
 /**
  * Outputs the caller method name so that accidental connections can be noticed
  *
  * Using echo() is safe, since fixtures should be enabled on the command line while running PHPUnit only!
  *
  * @return BashoRiak\Node
  */
 public function getActiveNode()
 {
     if ($this->usesFixtures()) {
         echo ' [RIAK CONNECT BY "' . $this->getFixtureCaller(8) . '"] ';
     }
     return parent::getActiveNode();
 }
All Usage Examples Of Basho\Riak::getActiveNode