/** * Parses the schema * * @param \Zend\Ldap\Dn $dn * @param \Zend\Ldap\Ldap $ldap * @return \Zend\Ldap\Node\Schema Provides a fluid interface */ protected function _parseSchema(Ldap\Dn $dn, Ldap\Ldap $ldap) { parent::_parseSchema($dn, $ldap); $this->_loadAttributeTypes(); $this->_loadLdapSyntaxes(); $this->_loadMatchingRules(); $this->_loadMatchingRuleUse(); $this->_loadObjectClasses(); return $this; }
public function testOpenLDAPSchemaObjectClassAliases() { if ($this->getLDAP()->getRootDse()->getServerType() !== Node\RootDse::SERVER_TYPE_OPENLDAP) { $this->markTestSkipped('Test can only be run on an OpenLDAP server'); } $objectClasses = $this->schema->getObjectClasses(); $this->assertArrayHasKey('OpenLDAProotDSE', $objectClasses); $this->assertArrayHasKey('LDAProotDSE', $objectClasses); $ob1 = $objectClasses['OpenLDAProotDSE']; $ob2 = $objectClasses['LDAProotDSE']; $this->assertSame($ob1, $ob2); }
/** * Parses the schema * * @param \Zend\Ldap\Dn $dn * @param \Zend\Ldap\Ldap $ldap * @return ActiveDirectory Provides a fluid interface */ protected function parseSchema(Ldap\Dn $dn, Ldap\Ldap $ldap) { parent::parseSchema($dn, $ldap); foreach ($ldap->search('(objectClass=classSchema)', $dn, Ldap\Ldap::SEARCH_SCOPE_ONE) as $node) { $val = new ObjectClass\ActiveDirectory($node); $this->objectClasses[$val->getName()] = $val; } foreach ($ldap->search('(objectClass=attributeSchema)', $dn, Ldap\Ldap::SEARCH_SCOPE_ONE) as $node) { $val = new AttributeType\ActiveDirectory($node); $this->attributeTypes[$val->getName()] = $val; } return $this; }