Return an object with each part of the version number

@return object
434112
public function getParts()
    {
        $parts = explode('.', $this->value);

        return (object) [
            'major' => !empty($parts[0]) ? intval($parts[0]) : 0,
            'minor' => !empty($parts[1]) ? intval($parts[1]) : 0,
            'patch' => !empty($parts[2]) ? intval($parts[2]) : 0,
        ];
    }
96967
public function version()
    {
        if ( $this->versionObject === null )
            $this->versionObject = eZContentObjectVersion::fetch( $this->attribute( 'ezcontentobject_version_id' ) );

        return $this->versionObject;
    }
449431
public function getVersionToModify()
    {
        $u = new User();
        $vObj = $this->getVersionObject();
        if ($this->isMasterCollection() || ($vObj->isNew())) {
            return $this;
        } else {
            $nc = $this->cloneVersion(null);

            return $nc;
        }
    }
1000082
public function getVersion()
    {
        $connector = $this->getBaseQuery();
        $connector->addCommandPart('version');
        $content = $connector->execute(false);

        if (is_array($content) && count($content) > 0) {
            $content = array_shift($content);
            $content = str_replace('gerrit version ', '', $content);
        }

        return $content;
    }
672157
public function getVersionNumber() {
        if (!isset($this->versionNumber)) {
            if (!$this->isConnected())
                $this->connect();
            $this->versionNumber = $this->sqlite->version()['versionNumber'];
        }
        return $this->versionNumber;
    }
890916
protected function getVersion()
    {
        // Get version from tag
        $cmd = new Command('git');
        $cmd = $cmd->arg('tag')
            ->execute();
        $output = explode(PHP_EOL, trim($cmd->getOutput()));
        $currentVersion = '0.0.0';
        foreach ($output as $tag) {
            if (preg_match(SemanticVersion::REGEX, $tag)) {
                if (version_compare($currentVersion, $tag, '<')) {
                    $currentVersion = $tag;
                }
            }
        }
        return new SemanticVersion($currentVersion);
    }
431212
def version_parts(self, best=False):
        
        version_str = self.version(best=best)
        if version_str:
            version_regex = re.compile(r'(\d+)\.?(\d+)?\.?(\d+)?')
            matches = version_regex.match(version_str)
            if matches:
                major, minor, build_number = matches.groups()
                return major, minor or '', build_number or ''
        return '', '', ''
183869
public function getVersion()
  {
    $composerJson = config('app.dir') . 'composer.json';

    if (file_exists($composerJson)) {
      $composer = json_decode(file_get_contents($composerJson, true));

      $version  = isset($composer->version) ? $composer->version : '1';
      $require  = isset($composer->require) ? (array)$composer->require : false;

      if (!is_array($require)) return "{$version} (1)";

      if (isset($require['modulusphp/framework'])) {
        return $version . " ({$require['modulusphp/framework']})";
      } else {
        return "{$version} (1)";
      }
    }

    return '1';
  }
223198
public function getVersion()
    {
        if ($this->_version) {
            return $this->_version;
        }

        $data = $this->request('/')->getData();

        return $this->_version = $data['version']['number'];
    }
382263
public function getVersion()
    {
        $version = $this->getProjectVersion();

        if (APPLICATION_ENV !== 'production' && APPLICATION_ENV !== 'acceptance' && APPLICATION_ENV !== 'demo') {
            $version .= '.' . $this->getBuild() . ' [' . APPLICATION_ENV . ']';
        }

        return $version;
    }
1033814
public function getSearchedVersions()
    {
        $versions = array();
        
        if (!empty($_REQUEST['Versions'])) {
            if (is_array($_REQUEST['Versions'])) {
                $versions = Convert::raw2att($_REQUEST['Versions']);
                $versions = array_combine($versions, $versions);
            } else {
                $version = Convert::raw2att($_REQUEST['Versions']);
                $versions[$version] = $version;
            }
        }

        return $versions;
    }
584476
public function getVersion()
    {
        if ($package = $this->getComposerInstall()) {
            if ($package->version === 'dev-master') {
                return 'dev-master (' . substr($package->source->reference, 0, 8) . ')';
            }
            return 'v' . $package->version;
        }
        return 'v' . self::$VERSION;
    }
495594
public function VersionsList()
    {
        $id = $this->owner->ID ?: $this->owner->OldID;
        $class = get_class($this->owner);
        return Versioned::get_all_versions($class, $id);
    }
664064
public function getRecentVersion()
    {
        $em = \ORM::entityManager();
        $r = $em->getRepository('\Concrete\Core\Entity\File\Version');

        return $r->findOneBy(
            ['file' => $this],
            ['fvID' => 'desc']
        );
    }
619677
public function getVersionString() {
        if ($this->versionString === null) {
            if (!$this->isConnected())
                $this->connect();
            $this->versionString = pg_version($this->hConnection)['server'];
        }
        return $this->versionString;
    }
99757
function getSupportedVersions()
    {
        $temp = array('version' => $this->version);
        if (isset($this->extensions['versions'])) {
            $temp['extensions'] = $this->extensions['versions'];
        }
        return $temp;
    }
720472
function getVersion()
    {
        if (empty($this->version))
            $this->version = self::Vx1_1;
        
        return $this->version;
    }