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

toBinary() публичный Метод

Get the binary string representation of the ACL.
public toBinary ( ) : string
Результат string
    public function toBinary()
    {
        $aces = '';
        foreach ($this->aces as $ace) {
            $aces .= $ace->toBinary();
        }
        return pack('C1C1v1v1v1', $this->revision, $this->sbz1, (16 + strlen(bin2hex($aces))) / 2, count($this->aces), $this->sbz2) . $aces;
    }

Usage Example

Пример #1
0
 /**
  * Get the binary string representation of the ACL.
  *
  * @param bool $canonicalize
  * @return string
  */
 public function toBinary($canonicalize = true)
 {
     if ($canonicalize) {
         $this->canonicalize();
     }
     return parent::toBinary();
 }