Esempio n. 1
0
 public function fromStdObj(stdClass $obj)
 {
     foreach ($obj->storage as $item) {
         $this->add(Item::fromStdObj($item));
     }
     return $this;
 }
Esempio n. 2
0
 public function testFromStdObj()
 {
     $json = json_encode($this->item);
     $this->assertEquals($this->item, ItemInstance::fromStdObj(json_decode($json)));
 }