private function validateArchiving($archiving)
    {
        if ($this->isRoot() && $archiving !== null) {
            throw new \LogicException("Root page can't be archived.");
        }

        if (!($archiving instanceof \DateTime)) {
            $archiving = $this->convertTimestampToDateTime($archiving);
        }

        if ($archiving->getTimestamp() < time() || $archiving < $this->_publishing) {
            throw new \LogicException("Page can't be archived in the past or before publication date.");
        }

        return $archiving;
    }
private function validateArchiving($archiving)
    {
        if ($this->isRoot() && $archiving !== null) {
            throw new \LogicException("Root page can't be archived.");
        }

        if (!($archiving instanceof \DateTime)) {
            $archiving = $this->convertTimestampToDateTime($archiving);
        }

        if ($archiving->getTimestamp() < time() || $archiving < $this->_publishing) {
            throw new \LogicException("Page can't be archived in the past or before publication date.");
        }

        return $archiving;
    }
private function validateArchiving ( $ archiving ) { if ( $ this -> isRoot ( ) && $ archiving !== null ) { throw new \ LogicException ( "Root page can't be archived." ) ; } if ( ! ( $ archiving instanceof \ DateTime ) ) { $ archiving = $ this -> convertTimestampToDateTime ( $ archiving ) ; } if ( $ archiving -> getTimestamp ( ) < time ( ) || $ archiving < $ this -> _publishing ) { throw new \ LogicException ( "Page can't be archived in the past or before publication date." ) ; } return $ archiving ; }
Validate the archiving date.

@param  \DateTime            $archiving

@return \DateTime

@throws \LogicException                          Raises if this page is root and archiving not null
or page not root but archiving datetime in the past.
Validate the archiving date .