LdapTools\Ldif\Ldif::getSchemaForType PHP Method

getSchemaForType() protected method

protected getSchemaForType ( string $type ) : LdapObjectSchema
$type string
return LdapTools\Schema\LdapObjectSchema
    protected function getSchemaForType($type)
    {
        if (!$this->schemaFactory || !$this->connection) {
            throw new InvalidArgumentException('If you set a schema type for a LDIF entry you must use a SchemaFactory and LdapConnection in the LDIF constructor.');
        }
        return $this->schemaFactory->get($this->connection->getConfig()->getSchemaName(), $type);
    }