90d6192246252366ba1f1165536784959e9c0285
[yaffs-website] / DurationInterface.php
1 <?php
2
3 namespace Drupal\Core\TypedData\Type;
4
5 /**
6  * Interface for durations.
7  *
8  * @ingroup typed_data
9  */
10 interface DurationInterface {
11
12   /**
13    * Returns the duration.
14    *
15    * @return \DateInterval|null
16    *   A DateInterval object or NULL if there is no duration.
17    *
18    * @throws \Exception
19    */
20   public function getDuration();
21
22   /**
23    * Sets the duration.
24    *
25    * @param \DateInterval $duration
26    *   A duration to set.
27    */
28   public function setDuration(\DateInterval $duration);
29
30 }