Returns an array of chunks which have changed since a version.

@param PageVersion $version

@return array
165014
public function since(PageVersion $version)
    {
        $chunks = [];

        foreach ($this->types as $type) {
            $className = $this->getModelName($type);

            $chunks[$type] = $className::getSince($version)->get();
        }

        return $chunks;
    }
1193800
public static function phpVersion($version)
    {
        static $phpVerisons = [];

        $version = (string)$version;

        if (!isset($phpVerisons[$version])) {
            $phpVerisons[$version] = version_compare(PHP_VERSION, $version, '>=');
        }
        return $phpVerisons[$version];
    }
1016471
public function importVersion($version)
    {
        return $this
            ->setMajor($version->getMajor())
            ->setMinor($version->getMinor())
            ->setPatch($version->getPatch())
            ->setPreRelease($version->getPreRelease())
            ->setBuild($version->getBuild());
    }
14635
private static function getVersionFrom($path)
    {
        $matches = [];
        preg_match(self::$semverRegex, $path, $matches);

        return array_shift($matches);
    }
1359027
protected function getCompareVersion(Version $version)
    {
        if ($version->isDev()) {
            return substr(
                $version->getFullPretty(),
                strlen($version->getPretty()) + 1
            );
        }

        return $version->getPretty();
    }
1211450
public function withProtocolVersion($version)
    {
        $request = clone $this;
        if (method_exists($request, 'setProtocolVersion')) {
            $request->setProtocolVersion($version);
        } else {
            $request->server->set('SERVER_PROTOCOL', $version);
        }

        return $request;
    }
9182
private function getBranchAliases(ApiPackage\Version $version)
    {
        $extra = $version->getExtra();
        if (null !== $extra
            && isset($extra["branch-alias"])
            && is_array($extra["branch-alias"])
        ) {
            return $extra["branch-alias"];
        }

        return null;
    }
738282
public static function toVersion($version)
    {
        $components = self::toComponents($version);

        return new Version(
            $components['major'],
            $components['minor'],
            $components['patch'],
            $components['pre'],
            $components['build']
        );
    }
1259804
public function parseVersions($versions)
    {
        $retValue = array();
        if (is_string($versions)) {
            $retValue[] = array($versions, '>=');
        } elseif (is_array($versions)) {
            foreach ($versions as $version) {
                if (is_string($version)) {
                    $retValue[] = array($version, '>=');
                } elseif (is_array($version)) {
                    $retValue[] = array($version[0], $version[1]);
                } else {
                    throw new \InvalidArgumentException('Invalid version. Needs to be a string or an array.');
                }
            }
        } else {
            throw new \InvalidArgumentException('Invalid version. Needs to be a string or an array.');
        }

        return $retValue;
    }
1100248
public function getMigrationVersion($version)
    {
        if ($this->isVersionAvailable($version)) {
            if ($this->isVersionLoaded($version)) {
                $configuration = $this->loadedVersions[$version];
            } else {
                $configuration = $this->loadConfiguration($version);
                $this->loadedVersions[$version] = $configuration;
            }
            return $configuration;
        }
        throw new MigrationException('Specified version is not available.', 1345821746);
    }
1302378
public function getValidVersionTags($versionRegex)
    {
        $validator = new TagValidator($versionRegex, $this->getTagPrefix());

        return $validator->filtrateList($this->vcs->getTags());
    }
1239656
public function find($type, $slotname, PageVersion $version)
    {
        $cached = $this->getFromCache($type, $slotname, $version);

        if ($cached !== false) {
            return $cached;
        }

        $class = $this->getModelName($type);

        $chunk = $version->getId() ?
            $class::getSingleChunk($version, $slotname)->first()
            : null;

        $this->saveToCache($type, $slotname, $version, $chunk);

        return $chunk;
    }
931656
protected function getVersion($version)
    {
        if (!$this->{$version.'Version'}) {
            $revisioned = get_class($this->revisioned);

            $revision = new $revisioned();
            $revision->setRawAttributes($this->{$version});

            $this->{$version.'Version'} = $revision;
        }

        return $this->{$version.'Version'};
    }
195941
public function getRoutes($version = null)
    {
        if (! is_null($version)) {
            return $this->routes[$version];
        }

        return $this->routes;
    }
1176668
public function getAllVersions()
    {
        $versions = array();

        foreach ($this->getEntities() as $entity) {
            if ($entity->getVersion()) {
                $versions[$entity->getVersion()] = $entity->getVersion();
            } else {
                $versions['0.0'] = _t('DocumentationManifest.MASTER', 'Master');
            }
        }

        asort($versions);

        return $versions;
    }
519504
public function getFromRevision($version, $key)
    {
        return ($this->isPassedThrough($key))
            ? $this->passThrough($version, $key)
            : array_get($this->{$version}, $key);
    }
359995
private function getVersionNumbers(array $versions): array
    {
        $versionNumbers = array_column($versions, 'versionNo');

        return array_combine($versionNumbers, array_fill_keys($versionNumbers, false));
    }