LdapTools\AttributeConverter\ConvertGPLink::getGPOLinkArray PHP Метод

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

protected getGPOLinkArray ( array $gpoInfo ) : GPOLink[]
$gpoInfo array
Результат LdapTools\Utilities\GPOLink[]
    protected function getGPOLinkArray(array $gpoInfo)
    {
        $GPOs = $this->getValuesForAttribute(array_keys($gpoInfo), 'distinguishedName', ['displayname', 'objectGuid']);
        $gpoLinks = [];
        // Doing one at a time to keep the order of the GPOs...
        foreach ($gpoInfo as $dn => $options) {
            foreach ($GPOs as $GPO) {
                if (MBString::strtolower($GPO->get('dn')) == MBString::strtolower($dn)) {
                    $attributes = ['dn' => $GPO->get('dn'), 'guid' => (new ConvertWindowsGuid())->fromLdap($GPO->get('objectGuid')), 'name' => $GPO->get('displayname')];
                    $gpoLinks[] = new GPOLink(new LdapObject($attributes), $options, $dn);
                    break;
                }
            }
        }
        return $gpoLinks;
    }