LdapTools\LdapManager::getSchemaFactory PHP Метод

getSchemaFactory() публичный Метод

Retrieve the schema factory instance.
public getSchemaFactory ( ) : LdapObjectSchemaFactory
Результат LdapTools\Factory\LdapObjectSchemaFactory
    public function getSchemaFactory()
    {
        if (!$this->schemaFactory) {
            $this->schemaFactory = new LdapObjectSchemaFactory($this->getCache(), $this->getSchemaParser(), $this->config->getEventDispatcher());
        }
        return $this->schemaFactory;
    }

Usage Example

 /**
  * {@inheritdoc}
  */
 public function warmUp($cacheDir)
 {
     $domain = $this->ldap->getDomainContext();
     foreach ($this->config->getDomainConfiguration() as $domainConfig) {
         $this->ldap->switchDomain($domainConfig->getDomainName());
         $schemaFactory = $this->ldap->getSchemaFactory();
         $parser = $this->ldap->getSchemaParser();
         $schema = empty($domainConfig->getSchemaName()) ? $domainConfig->getLdapType() : $domainConfig->getSchemaName();
         $ldapObjects = $parser->parseAll($schema);
         $this->cacheAllLdapSchemaObjects($schemaFactory, ...$ldapObjects);
     }
     $this->ldap->switchDomain($domain);
 }
All Usage Examples Of LdapTools\LdapManager::getSchemaFactory