From d2155ab3ce92bc8cc05d171f86822293cef83d1b Mon Sep 17 00:00:00 2001 From: Sokil Date: Thu, 25 Jan 2018 17:33:23 +0200 Subject: [PATCH] add sequence --- src/Ad/AbstractAdNode.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/Ad/AbstractAdNode.php b/src/Ad/AbstractAdNode.php index 9f9f707..a63c55e 100644 --- a/src/Ad/AbstractAdNode.php +++ b/src/Ad/AbstractAdNode.php @@ -67,6 +67,29 @@ public function setId($id) return $this; } + /** + * Format a VAST 3.0 response that groups multiple ads into a sequential pod of ads + * + * @param int $sequence a number greater than zero (0) that identifies the sequence in which an ad should play; + * all elements with sequence values are part of a pod and are intended to be played + * in sequence + * + * @return InLine|Wrapper|AbstractAdNode + */ + public function setSequence($sequence) + { + $this->domElement->setAttribute('sequence', $sequence); + return $this; + } + + /** + * @return int + */ + public function getSequence() + { + return $this->domElement->getAttribute('sequence'); + } + /** * /Vast/Ad/Inline/AdSystem element *