LdapTools\Configuration::setSchemaFolder PHP Метод

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

Set the location where the schema definitions exist.
public setSchemaFolder ( $folder )
$folder string The full path to the folder.
    public function setSchemaFolder($folder)
    {
        $this->config['schemaFolder'] = $folder;
        return $this;
    }

Usage Example

Пример #1
0
 function it_should_register_converters_listed_in_the_config()
 {
     $config = new Configuration();
     $config->setSchemaFolder(__DIR__ . '/../resources/schema');
     $config->setAttributeConverters(['my_bool' => '\\LdapTools\\AttributeConverter\\ConvertBoolean']);
     $domain = new DomainConfiguration('example.com');
     $domain->setServers(['example'])->setLazyBind(true)->setBaseDn('dc=example,dc=com')->setSchemaName('example');
     $config->addDomain($domain);
     $this->beConstructedWith($config);
     $this->buildLdapQuery()->from('custom_converter')->where(['foo' => true])->toLdapFilter()->shouldBeEqualTo('(&(objectClass=foo)(&(bar=TRUE)))');
 }