Exemplo n.º 1
0
 public function __construct($sXml = NULL)
 {
     if ($sXml) {
         $this->name = $sXml->tag;
         $this->count = $sXml->tagCount;
     }
     parent::getInstance();
 }
Exemplo n.º 2
0
 /**
  * You may create VoxbProfile object without parametes
  * if you for example would like to create a new user/profile.
  *
  * @param object $xml
  * @param string $crp
  */
 public function __construct($xml = NULL, $cpr = NULL)
 {
     if ($xml) {
         $this->cpr = $cpr;
         $this->fetch($xml);
     }
     parent::getInstance();
 }
Exemplo n.º 3
0
 public function __construct()
 {
     parent::getInstance();
     /**
      * Review is a review too.
      */
     $this->tags = new VoxbTags();
     $this->reviews = new VoxbReviewsController($this->reviewHandlers);
 }
Exemplo n.º 4
0
 /**
  * Constructor as parameter gets a part of SimpleXml object received from the server.
  *
  * @param $voxbObj
  */
 public function __construct($voxbObj = NULL)
 {
     parent::getInstance();
     if ($voxbObj) {
         $this->title = (string) $voxbObj->review->reviewTitle;
         $this->text = (string) $voxbObj->review->reviewData;
         $this->authorVoxbId = (int) $voxbObj->userId;
         $this->authorName = (string) $voxbObj->userAlias->aliasName;
         $this->voxbId = intval($voxbObj->voxbIdentifier);
     }
 }
Exemplo n.º 5
0
 public function testUpdateTag()
 {
     $obj = VoxbBase::getInstance();
     $profile = new VoxbProfile();
     $profile->setUserId($this->users[0]);
     $profile->fetchMyData();
     // add a new tag (and keep old tags)
     $tag = new VoxbTagRecord();
     $this->assertTrue($tag->create('111111111', 'tag_new', $profile));
     $item = new VoxbItem();
     $item->fetchByFaust('111111111');
     $this->assertEquals($item->getTags()->getCount(), 5);
 }
Exemplo n.º 6
0
 public function tearDown()
 {
     $obj = VoxbBase::getInstance();
     // remove created users
     foreach ($this->users as $v) {
         $obj->call('deleteUser', array('userId' => $v));
     }
     $response = $obj->call('fetchData', array('fetchData' => array('objectIdentifierValue' => '111111111', 'objectIdentifierType' => 'FAUST'), 'output' => array('contentType' => 'all')));
     // fetch all voxbIdentifier
     $voxbIdentifier = array();
     if ($response->totalItemData) {
         if ($response->totalItemData->userItems) {
             foreach ($response->totalItemData->userItems as $v) {
                 $voxbIdentifier[] = intval($v->voxbIdentifier);
             }
         }
     }
     //remove user posts
     foreach ($voxbIdentifier as $v) {
         $obj->call('deleteMyData', array('voxbIdentifier' => $v));
     }
 }
Exemplo n.º 7
0
 public function __construct()
 {
     parent::getInstance();
     $this->position = 0;
 }
Exemplo n.º 8
0
 public function __construct()
 {
     parent::getInstance();
 }