DurationInterface.php in Drupal 9
Same filename and directory in other branches
Namespace
Drupal\Core\TypedData\TypeFile
core/lib/Drupal/Core/TypedData/Type/DurationInterface.phpView source
<?php
namespace Drupal\Core\TypedData\Type;
/**
* Interface for durations.
*
* @ingroup typed_data
*/
interface DurationInterface {
/**
* Returns the duration.
*
* @return \DateInterval|null
* A DateInterval object or NULL if there is no duration.
*
* @throws \Exception
*/
public function getDuration();
/**
* Sets the duration.
*
* @param \DateInterval $duration
* A duration to set.
*/
public function setDuration(\DateInterval $duration);
}
Interfaces
Name | Description |
---|---|
DurationInterface | Interface for durations. |