Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Interval.php

class Interval

Hierarchy

  • class \Composer\Semver\Interval

Expanded class hierarchy of Interval

1 file declares its use of Interval
IgnoreListPlatformRequirementFilter.php in vendor/composer/composer/src/Composer/Filter/PlatformRequirementFilter/IgnoreListPlatformRequirementFilter.php
2 string references to 'Interval'
AutomatedCron::onTerminate in core/modules/automated_cron/src/EventSubscriber/AutomatedCron.php
Run the automated cron if enabled.
AutomatedCronHooks::formSystemCronSettingsAlter in core/modules/automated_cron/src/Hook/AutomatedCronHooks.php
Implements hook_form_FORM_ID_alter() for the system_cron_settings() form.

File

vendor/composer/semver/src/Interval.php, line 16

Namespace

Composer\Semver
View source
class Interval {
    
    /** @var Constraint */
    private $start;
    
    /** @var Constraint */
    private $end;
    public function __construct(Constraint $start, Constraint $end) {
        $this->start = $start;
        $this->end = $end;
    }
    
    /**
     * @return Constraint
     */
    public function getStart() {
        return $this->start;
    }
    
    /**
     * @return Constraint
     */
    public function getEnd() {
        return $this->end;
    }
    
    /**
     * @return Constraint
     */
    public static function fromZero() {
        static $zero;
        if (null === $zero) {
            $zero = new Constraint('>=', '0.0.0.0-dev');
        }
        return $zero;
    }
    
    /**
     * @return Constraint
     */
    public static function untilPositiveInfinity() {
        static $positiveInfinity;
        if (null === $positiveInfinity) {
            $positiveInfinity = new Constraint('<', PHP_INT_MAX . '.0.0.0');
        }
        return $positiveInfinity;
    }
    
    /**
     * @return self
     */
    public static function any() {
        return new self(self::fromZero(), self::untilPositiveInfinity());
    }
    
    /**
     * @return array{'names': string[], 'exclude': bool}
     */
    public static function anyDev() {
        // any == exclude nothing
        return array(
            'names' => array(),
            'exclude' => true,
        );
    }
    
    /**
     * @return array{'names': string[], 'exclude': bool}
     */
    public static function noDev() {
        // nothing == no names included
        return array(
            'names' => array(),
            'exclude' => false,
        );
    }

}

Members

Title Sort descending Modifiers Object type Summary
Interval::$end private property @var Constraint
Interval::$start private property @var Constraint
Interval::any public static function
Interval::anyDev public static function
Interval::fromZero public static function
Interval::getEnd public function
Interval::getStart public function
Interval::noDev public static function
Interval::untilPositiveInfinity public static function
Interval::__construct public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal