ActivityModel::setPruneAfter PHP Метод

setPruneAfter() публичный Метод

Set the prune after date.
public setPruneAfter ( string $pruneAfter ) : ActivityModel
$pruneAfter string A string compatible with {@link strtotime()}. Be sure to specify a negative string.
Результат ActivityModel Returns `$this` for fluent calls.
    public function setPruneAfter($pruneAfter)
    {
        if ($pruneAfter) {
            // Make sure the string is negative.
            $now = time();
            $testTime = strtotime($pruneAfter, $now);
            if ($testTime === false) {
                throw new InvalidArgumentException('Invalid timespan value for "prune after".', 400);
            }
        }
        $this->pruneAfter = $pruneAfter;
        return $this;
    }