コード例 #1
0
 public function testSetItemModifiesItem()
 {
     $item = static::$item;
     $serialized = static::$serialized;
     $event = new ResourceSerializeEvent(new StringResource($item), $item);
     $event->setItem($serialized);
     $this->assertEquals(static::$serialized, $event->getItem());
     $this->assertEquals(static::$serialized, $item);
 }
コード例 #2
0
 /**
  * Catches the raw xml for an item.
  *
  * @param ResourceSerializeEvent $e
  */
 public function onResourcePreSerialize(ResourceSerializeEvent $e)
 {
     $this->rawData = $e->getItem();
 }