src/LdapTools/Hydrator/ArrayHydrator.php
protected function validateAttributesToLdap(array $attributes)
    {
        if (!$this->schema) {
            return;
        }
        $missing = [];

        foreach ($this->schema->getRequiredAttributes() as $attribute) {
            if (!array_key_exists(strtolower($attribute), array_change_key_case($attributes))) {
                $missing[] = $attribute;
            }
        }

        if (!empty($missing)) {
            throw new LogicException(
                sprintf('The following required attributes are missing: %s', implode(', ', $missing))
            );
        }
    }
protected function validateAttributesToLdap(array $attributes)
    {
        if (!$this->schema) {
            return;
        }
        $missing = [];

        foreach ($this->schema->getRequiredAttributes() as $attribute) {
            if (!array_key_exists(strtolower($attribute), array_change_key_case($attributes))) {
                $missing[] = $attribute;
            }
        }

        if (!empty($missing)) {
            throw new LogicException(
                sprintf('The following required attributes are missing: %s', implode(', ', $missing))
            );
        }
    }
protected function validateAttributesToLdap ( array $ attributes ) { if ( ! $ this -> schema ) { return ; } $ missing = [ ] ; foreach ( $ this -> schema -> getRequiredAttributes ( ) as $ attribute ) { if ( ! array_key_exists ( strtolower ( $ attribute ) , array_change_key_case ( $ attributes ) ) ) { $ missing [ ] = $ attribute ; } } if ( ! empty ( $ missing ) ) { throw new LogicException ( sprintf ( 'The following required attributes are missing: %s' , implode ( ', ' , $ missing ) ) ) ; } }
Checks to make sure all required attributes are present.

@param array $attributes
Checks to make sure all required attributes are present .