LdapTools\Schema\Parser\SchemaYamlParser::parseControls PHP Method

parseControls() protected method

protected parseControls ( array $objectSchema ) : LdapControl[]
$objectSchema array
return LdapTools\Connection\LdapControl[]
    protected function parseControls($objectSchema)
    {
        $controls = [];
        if (array_key_exists('controls', $objectSchema)) {
            foreach ($objectSchema['controls'] as $control) {
                if (!is_array($control)) {
                    throw new SchemaParserException('The "controls" directive must contain arrays of controls.');
                }
                $controls[] = new LdapControl(...$control);
            }
        }
        return $controls;
    }