src/LdapTools/Security/SddlParser.php
public function parse($sddl)
    {
        if (!preg_match(self::MATCH_SDDL, (string) $sddl, $matches)) {
            throw new SddlParserException('The SDDL string is not valid.');
        }

        $sd = (new SecurityDescriptor())
            ->setOwner($this->getSid($matches[1], 'owner'))
            ->setGroup($this->getSid($matches[2], 'group'));

        $this->parseAcl(strtoupper($matches[4]), $matches[5], $sd);
        if (isset($matches[7])) {
            $this->parseAcl(strtoupper($matches[7]), $matches[8], $sd);
        }

        return $sd;
    }
public function parse($sddl)
    {
        if (!preg_match(self::MATCH_SDDL, (string) $sddl, $matches)) {
            throw new SddlParserException('The SDDL string is not valid.');
        }

        $sd = (new SecurityDescriptor())
            ->setOwner($this->getSid($matches[1], 'owner'))
            ->setGroup($this->getSid($matches[2], 'group'));

        $this->parseAcl(strtoupper($matches[4]), $matches[5], $sd);
        if (isset($matches[7])) {
            $this->parseAcl(strtoupper($matches[7]), $matches[8], $sd);
        }

        return $sd;
    }
public function parse ( $ sddl ) { if ( ! preg_match ( self :: MATCH_SDDL , ( string ) $ sddl , $ matches ) ) { throw new SddlParserException ( 'The SDDL string is not valid.' ) ; } $ sd = ( new SecurityDescriptor ( ) ) -> setOwner ( $ this -> getSid ( $ matches [ 1 ] , 'owner' ) ) -> setGroup ( $ this -> getSid ( $ matches [ 2 ] , 'group' ) ) ; $ this -> parseAcl ( strtoupper ( $ matches [ 4 ] ) , $ matches [ 5 ] , $ sd ) ; if ( isset ( $ matches [ 7 ] ) ) { $ this -> parseAcl ( strtoupper ( $ matches [ 7 ] ) , $ matches [ 8 ] , $ sd ) ; } return $ sd ; }
Given a full SDDL string, parse it and return the SecurityDescriptor object that it represents.

@param string $sddl
@return SecurityDescriptor
@throws SddlParserException
Given a full SDDL string parse it and return the SecurityDescriptor object that it represents .