LdapTools\Security\Acl\Acl::decodeBinary PHP Метод

decodeBinary() защищенный Метод

protected decodeBinary ( string $acl )
$acl string
    protected function decodeBinary($acl)
    {
        $acl = bin2hex($acl);
        $this->revision = hexdec(substr($acl, 0, 2));
        $this->sbz1 = hexdec(substr($acl, 2, 2));
        $this->sbz2 = $this->hexUShort16Le2Int(substr($acl, 12, 4));
        $position = 16;
        $aceCount = $this->hexUShort16Le2Int(substr($acl, 8, 4));
        for ($i = 0; $i < $aceCount; $i++) {
            // The ACE Size is always in this position, so use it to determine how much data we grab...
            $aceLength = $this->hexUShort16Le2Int(substr($acl, $position + 4, 4)) * 2;
            $ace = new Ace(hex2bin(substr($acl, $position, $aceLength)));
            $this->addAce($ace);
            $position += $aceLength;
        }
    }