LdapTools\AttributeConverter\ConvertExchangeVersion::parseRevision PHP Метод

parseRevision() защищенный Метод

protected parseRevision ( string $revision ) : string
$revision string
Результат string
    protected function parseRevision($revision)
    {
        $revision = explode('.', $revision);
        /**
         * Is this really the correct way to do this? I'm not sure why, but the build number exposed in LDAP seems to
         * start with extra numbers that don't relate to anything. That is why the first part is grabbing that last 4
         * numbers. The others mean something else? Tested in an Exchange 2013 environment anyway.
         */
        if (count($revision) >= 1) {
            $revision[0] = count($revision) == 1 ? $revision[0] : substr($revision[0], -4);
        }
        if (count($revision) == 2) {
            $revision[1] = str_pad($revision[1], 3, '0', STR_PAD_LEFT);
        }
        return implode('.', $revision);
    }