PHP Class LdapTools\Security\Ace\Ace

Author: Chad Sikorra ([email protected])
Inheritance: use trait LdapTools\Utilities\NumberUtilitiesTrait
Show file Open project: ldaptools/ldaptools Class Usage Examples

Protected Properties

Property Type Description
$aceRights AceRights
$applciationData Any application specific data for the ACE (in binary string format).
$flags AceFlags
$inheritedObjectType The inherited object GUID, if present.
$objectFlags When this is an object type ACE, these flags describe what GUID objects are present.
$objectType The object GUID, if present.
$trustee The trustee SID this ACE relates to.
$type AceType

Public Methods

Method Description
__construct ( null | string | AceType $ace = null )
__toString ( ) : string
getApplicationData ( ) : string Get the binary string form of the application data contained in this ACE.
getFlags ( ) : AceFlags Get the AceFlags object that contains all the flags set for this ACE.
getInheritedObjectType ( ) : GUID | null Get the inherited GUID object type this ACE applies to.
getObjectFlags ( ) : AceObjectFlags Get the object flags that apply to the object type GUIDs.
getObjectType ( ) : GUID | null Get the GUID object type this ACE applies to.
getRights ( ) : AceRights Get the AceRights object that contains all the rights flags set against this ACE.
getTrustee ( ) : SID Get the trustee SID this ACE applies to.
getType ( ) : AceType | null Get the AceType.
isAllowAce ( ) : boolean A convenience method to check whether this is an ace to allow access.
isDenyAce ( ) : boolean A convenience method to check whether this is an ace to deny access.
isObjectAce ( ) : boolean A convenience method to check whether this is an object type ACE.
setApplicationData ( string $appData ) Set the binary string application data for this ACE. You MUST pass the binary form of the data.
setFlags ( AceFlags $aceFlags ) Set the AceFlags object that contains all the flags set for this ACE.
setInheritedObjectType ( GUID | string | null $guid ) Set the inherited GUID object type this ACE applies to.
setObjectFlags ( AceObjectFlags $objectFlags = null ) Set the object flags that apply to the object type GUIDs.
setObjectType ( GUID | string | null $guid ) Set the GUID object type this ACE applies to.
setRights ( AceRights $aceRights ) Set the AceRights for this ACE.
setTrustee ( SID | string $sid ) Set the trustee SID this ACE applies to.
setType ( AceType $type ) Set the AceType.
toBinary ( ) : string Get the binary string representation of this ACE.
toSddl ( ) : string Get the SDDL string format that represents this ACE.

Protected Methods

Method Description
decodeFromBinary ( string $ace )
endsWith ( string $needle, string $haystack ) : boolean
startsWith ( string $needle, string $haystack ) : boolean
toggleObjectStatus ( GUID | null $object, integer $type )
validateSid ( ) Some quick checks before going to SDDL or binary.

Method Details

__construct() public method

public __construct ( null | string | AceType $ace = null )
$ace null | string | AceType

__toString() public method

public __toString ( ) : string
return string

decodeFromBinary() protected method

protected decodeFromBinary ( string $ace )
$ace string

endsWith() protected method

protected endsWith ( string $needle, string $haystack ) : boolean
$needle string
$haystack string
return boolean

getApplicationData() public method

Get the binary string form of the application data contained in this ACE.
public getApplicationData ( ) : string
return string

getFlags() public method

Get the AceFlags object that contains all the flags set for this ACE.
public getFlags ( ) : AceFlags
return AceFlags

getInheritedObjectType() public method

Get the inherited GUID object type this ACE applies to.
public getInheritedObjectType ( ) : GUID | null
return LdapTools\Security\GUID | null

getObjectFlags() public method

Get the object flags that apply to the object type GUIDs.
public getObjectFlags ( ) : AceObjectFlags
return AceObjectFlags

getObjectType() public method

Get the GUID object type this ACE applies to.
public getObjectType ( ) : GUID | null
return LdapTools\Security\GUID | null

getRights() public method

Get the AceRights object that contains all the rights flags set against this ACE.
public getRights ( ) : AceRights
return AceRights

getTrustee() public method

Get the trustee SID this ACE applies to.
public getTrustee ( ) : SID
return LdapTools\Security\SID

getType() public method

Get the AceType.
public getType ( ) : AceType | null
return AceType | null

isAllowAce() public method

A convenience method to check whether this is an ace to allow access.
public isAllowAce ( ) : boolean
return boolean

isDenyAce() public method

A convenience method to check whether this is an ace to deny access.
public isDenyAce ( ) : boolean
return boolean

isObjectAce() public method

A convenience method to check whether this is an object type ACE.
public isObjectAce ( ) : boolean
return boolean

setApplicationData() public method

Set the binary string application data for this ACE. You MUST pass the binary form of the data.
public setApplicationData ( string $appData )
$appData string

setFlags() public method

Set the AceFlags object that contains all the flags set for this ACE.
public setFlags ( AceFlags $aceFlags )
$aceFlags AceFlags

setInheritedObjectType() public method

Set the inherited GUID object type this ACE applies to.
public setInheritedObjectType ( GUID | string | null $guid )
$guid LdapTools\Security\GUID | string | null

setObjectFlags() public method

Set the object flags that apply to the object type GUIDs.
public setObjectFlags ( AceObjectFlags $objectFlags = null )
$objectFlags AceObjectFlags

setObjectType() public method

Set the GUID object type this ACE applies to.
public setObjectType ( GUID | string | null $guid )
$guid LdapTools\Security\GUID | string | null

setRights() public method

Set the AceRights for this ACE.
public setRights ( AceRights $aceRights )
$aceRights AceRights

setTrustee() public method

Set the trustee SID this ACE applies to.
public setTrustee ( SID | string $sid )
$sid LdapTools\Security\SID | string

setType() public method

Set the AceType.
public setType ( AceType $type )
$type AceType

startsWith() protected method

protected startsWith ( string $needle, string $haystack ) : boolean
$needle string
$haystack string
return boolean

toBinary() public method

Get the binary string representation of this ACE.
public toBinary ( ) : string
return string

toSddl() public method

Get the SDDL string format that represents this ACE.
public toSddl ( ) : string
return string

toggleObjectStatus() protected method

protected toggleObjectStatus ( GUID | null $object, integer $type )
$object LdapTools\Security\GUID | null
$type integer

validateSid() protected method

Some quick checks before going to SDDL or binary.
protected validateSid ( )

Property Details

$aceRights protected property

protected AceRights,LdapTools\Security\Ace $aceRights
return AceRights

$applciationData protected property

Any application specific data for the ACE (in binary string format).
protected $applciationData

$flags protected property

protected AceFlags,LdapTools\Security\Ace $flags
return AceFlags

$inheritedObjectType protected property

The inherited object GUID, if present.
protected $inheritedObjectType

$objectFlags protected property

When this is an object type ACE, these flags describe what GUID objects are present.
protected $objectFlags

$objectType protected property

The object GUID, if present.
protected $objectType

$trustee protected property

The trustee SID this ACE relates to.
protected $trustee

$type protected property

protected AceType,LdapTools\Security\Ace $type
return AceType