Example #1
0
 /**
  * Test Delete Object
  */
 public function testDeleteObject()
 {
     $expected = true;
     $doc = array('r' => 666);
     $newObject = $this->v3ctor->newObject("demo", $doc);
     $id = V3Sdk::getId($newObject['_id']);
     $result = $this->v3ctor->deleteObject("demo", $id);
     $this->assertEquals($expected, $result);
 }
Example #2
0
 /**
  * Singleton Implementation
  * 
  * @param string $v3Url    V3ctor URL
  * @param string $v3Key    V3ctor Private Key
  * @return resource | null
  */
 public static function getInstance($v3Url = '', $v3Key = '')
 {
     // If exists Instance return same Instance
     if (self::$_instance) {
         return self::$_instance;
     } else {
         $class = __CLASS__;
         self::$_instance = new $class($v3Url, $v3Key);
         return self::$_instance;
     }
 }