LdapTools\Schema\LdapObjectSchema::setRequiredAttributes PHP Method

setRequiredAttributes() public method

Set the required attributes when creating this object.
public setRequiredAttributes ( array $attributes )
$attributes array
    public function setRequiredAttributes(array $attributes)
    {
        $this->requiredAttributes = $attributes;
    }

Usage Example

Esempio n. 1
0
 function it_should_error_when_a_required_attribute_is_missing_going_to_ldap()
 {
     $schema = new LdapObjectSchema('ad', 'user');
     $schema->setRequiredAttributes(['foo']);
     $this->setLdapObjectSchema($schema);
     $this->shouldThrow('\\LogicException')->duringHydrateToLdap($this->objectToLdap);
 }