示例#1
0
 /**
  * Implements the versions/poll method to get the state of a version
  */
 public function poll()
 {
     $rc = Litmus_RESTful_Client::singleton();
     $res = $rc->get('tests/' . $this->getTestId() . '/versions/' . $this->version . '/poll.xml');
     $versions = Litmus_Version::load($res, $this->getTestId());
     return array_pop($versions);
 }
示例#2
0
文件: Test.php 项目: Natronick/Litmus
 /**
  * Set the Litmus_Test property from XML DOMElement
  *
  * @param string $property the property to set
  * @param mixed $value the Value or DOMElement
  * @return void
  */
 public function __set($property, $value)
 {
     switch ($property) {
         case 'created_at':
         case 'id':
         case 'updated_at':
         case 'name':
         case 'service':
         case 'state':
         case 'public_sharing':
         case 'url_or_guid':
             $this->{$property} = $value->nodeValue;
             break;
         case 'test_set_versions':
             $this->{$property} = Litmus_Version::load($value, $this->id);
             break;
     }
 }