Sets whether or not to parse dates passed to the marshal() function
by using a locale aware parser.

@param bool $enable Whether or not to enable
@return $this
161825
public function useLocaleParser($enable = true)
    {
        if ($enable === false) {
            $this->_useLocaleParser = $enable;

            return $this;
        }
        if (method_exists($this->_className, 'parseDateTime')) {
            $this->_useLocaleParser = $enable;

            return $this;
        }
        throw new RuntimeException(
            sprintf('Cannot use locale parsing with the %s class', $this->_className)
        );
    }
258979
public function enableCache($enable = true)
    {
        $this->enableCache = (bool) $enable;

        $this->refreshSettingDependentCriteria();

        return $this;
    }
1242876
public function set_threading($enable = false)
    {
        $this->threading = false;

        if ($enable && ($caps = $this->get_capability('THREAD'))) {
            $methods = array('REFS', 'REFERENCES', 'ORDEREDSUBJECT');
            $methods = array_intersect($methods, $caps);

            $this->threading = array_shift($methods);
        }

        return $this->threading;
    }
121528
public function setEnabled(Enabled $enabled)
    {
        $randomMode = false === $enabled->value() ? new PhpUnitRandomMode(false) : $this->randomMode;
        $options = false === $enabled->value() ? new PhpUnitOptions(null) : $this->options;
        
        return new self(
            new Undefined(false),
            $enabled,
            $randomMode,
            $options
        );
    }
126103
public function setEnable($enable)
    {
        $properties = $this->getProperty();
        $properties['enable'] = (boolean) $enable;
        $this->getConfig()->setSection('bundle', $properties, true);

        return $this;
    }
1075104
public function setOptions($options, $disabled = false)
    {
        if (is_callable($options))
            return $this->setOptions($options($this), $disabled);
        else if (is_array($options))
            return $this->options($options, $disabled);
        else
            return $this;
    }
1235555
public function animate($enable = false)
    {
        $this->setOption(self::OPTION_ANIMATE, (bool)$enable);

        return $this;
    }
503464
public function disableCreatingCheck(bool $disable = true)
    {
        $this->builder()->getFooter()->disableCreatingCheck($disable);

        return $this;
    }
100916
protected function setFormat(FormatInterface $format, bool $remove = null): FormatterInterface
    {
        $name = $format->getName();
        $formats = $this->getFormats();
        if (array_key_exists($name, $formats) === false) {
            throw new FormatNotSupported($format);
        }

        $code = $formats[$name];
        $format = $this->getFormat();
        if ($remove === true) {
            $this->format = array_diff($format, [$code]);
        } else {
            $this->format = array_merge($format, [$code]);
        }

        return $this;
    }
213996
public function setDisabled( $disabled ) {
		$this->disabled = (bool)$disabled;
		$this->toggleClasses( [ 'oo-ui-widget-disabled' ], $this->disabled );
		$this->toggleClasses( [ 'oo-ui-widget-enabled' ], !$this->disabled );
		$this->setAttributes( [ 'aria-disabled' => $this->disabled ? 'true' : 'false' ] );

		return $this;
	}
868084
public function setExcludeSelf($s = 'true'){
        if ($s == 'true' || (is_bool($s) && $s == true)){
            $this->options['ExcludeMe'] = 'true';
        } else if ($s == 'false' || (is_bool($s) && $s == false)){
            $this->options['ExcludeMe'] = 'false';
        } else {
            return false;
        }
    }
883212
public function on($date)
    {
        $parsedDate = \date_parse($date);
        $segments = \array_intersect_key($parsedDate, $this->fieldsPosition);

        if ($parsedDate['year']) {
            $this->skip(static function () use ($parsedDate) {
                return (int) \date('Y') !== $parsedDate['year'];
            });
        }

        foreach ($segments as $key => $value) {
            if (false !== $value) {
                $this->spliceIntoPosition($this->fieldsPosition[$key], (string) $value);
            }
        }

        return $this;
    }
1232061
public function isEnable($enable = null)
    {
        if ($enable !== null) {
            $this->enable = (bool) $enable;
        }

        return $this->enable;
    }
432151
public function setDate($date)
    {
        $this->add(self::PERIOD, $date->getPeriod());
        $this->add(self::DATE, $date->getDate());

        return $this;
    }
1323294
public function setDate($date, $diff = false) {
        $dateTemp = str_replace('/', '-', $date);
        $formatedDate = date($this->dateFormat, strtotime($dateTemp));
        list($year, $month, $day) = explode("-", $formatedDate);
        if ($diff) {
            $this->dateTimeDiff = null;
            $this->dateTimeDiff = new \DateTime();
            $this->dateTimeDiff->setDate($year, $month, $day);
        } else {
            $this->dateTime = null;
            $this->dateTime = new \DateTime();
            $this->dateTime->setDate($year, $month, $day);
        }
        return $this;
    }
691695
protected function supportFilter( array $list = [], bool $enable = true ) {
    foreach( $list as $type ) {
      if( !$enable ) unset( $this->_filter[ $type ] );
      else if( !isset( $this->_filter[ $type ] ) ) $this->_filter[ $type ] = [];
    }

    return $this;
  }
556935
public function enable($capability, $enable = true)
    {
        $capability = Horde_String::upper($capability);
        $enabled = $this->isEnabled($capability);

        if ($enable && !$enabled) {
            switch ($capability) {
            case 'QRESYNC':
                /* RFC 7162 [3.2.3] - Enabling QRESYNC also implies enabling
                 * of CONDSTORE. */
                $this->enable('CONDSTORE');
                break;
            }

            $this->_enabled[] = $capability;
            $this->notify();
        } elseif (!$enable && $enabled) {
            $this->_enabled = array_diff($this->_enabled, array($capability));
            $this->notify();
        }
    }