public function toBinary()
{
$this->validateSid();
$binary = '';
if ($this->objectFlags !== null) {
$binary .= pack('V1', $this->objectFlags->getValue());
}
if ($this->objectType) {
$binary .= $this->objectType->toBinary();
}
if ($this->inheritedObjectType) {
$binary .= $this->inheritedObjectType->toBinary();
}
$binary .= $this->trustee->toBinary();
if ($this->applciationData) {
$binary .= $this->applciationData;
}
return pack('C1C1v1l1', $this->type->getValue(), $this->flags->getValue(), (16 + strlen(bin2hex($binary))) / 2, $this->aceRights->getValue()) . $binary;
}