function DateTimePlus::__clone

Same name in other branches
  1. 9 core/lib/Drupal/Component/Datetime/DateTimePlus.php \Drupal\Component\Datetime\DateTimePlus::__clone()
  2. 10 core/lib/Drupal/Component/Datetime/DateTimePlus.php \Drupal\Component\Datetime\DateTimePlus::__clone()
  3. 11.x core/lib/Drupal/Component/Datetime/DateTimePlus.php \Drupal\Component\Datetime\DateTimePlus::__clone()

Implements the magic __clone method.

Deep-clones the DateTime object we're wrapping.

File

core/lib/Drupal/Component/Datetime/DateTimePlus.php, line 412

Class

DateTimePlus
Wraps DateTime().

Namespace

Drupal\Component\Datetime

Code

public function __clone() {
    $this->dateTimeObject = clone $this->dateTimeObject;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.