class DatabaseRepository implements PermissionRepository

Class DatabaseRepository

Properties

protected VirtualConnectionInterface $conn Connection instance
protected string $table Table name

Methods

findByName(string $siteKey, string $name)

Find a registered by type and name

insert(Permission $item)

Insert register information

update(Permission $item)

Update register information

int
delete(Permission $item)

Delete register information

array
fetchAncestor(string $siteKey, string $name)

Returns ancestor of item

array
fetchDescendant(string $siteKey, string $name)

Returns descendant of item

void
foster(Permission $item, string $to)

Parent Changing with descendant

void
affiliate(Permission $item, string $to)

affiliated to another registered

string
getNow()

Now datetime string

createItem(array $attributes)

Create a new registered object instance

Details

at line 52
__construct(VirtualConnectionInterface $conn)

Constructor

Parameters

VirtualConnectionInterface $conn Connection instance

at line 65
Permission findByName(string $siteKey, string $name)

Find a registered by type and name

Parameters

string $siteKey site key
string $name target name

Return Value

Permission

at line 82
Permission insert(Permission $item)

Insert register information

Parameters

Permission $item permission instance

Return Value

Permission

at line 104
Permission update(Permission $item)

Update register information

Parameters

Permission $item permission instance

Return Value

Permission

at line 124
int delete(Permission $item)

Delete register information

Parameters

Permission $item permission instance

Return Value

int affecting statement

at line 136
array fetchAncestor(string $siteKey, string $name)

Returns ancestor of item

Parameters

string $siteKey site key
string $name target name

Return Value

array

at line 158
array fetchDescendant(string $siteKey, string $name)

Returns descendant of item

Parameters

string $siteKey site key
string $name target name

Return Value

array

at line 181
void foster(Permission $item, string $to)

Parent Changing with descendant

Parameters

Permission $item permission instance
string $to parent name

Return Value

void

at line 209
void affiliate(Permission $item, string $to)

affiliated to another registered

Parameters

Permission $item permission instance
string $to parent name

Return Value

void

at line 227
string getNow()

Now datetime string

Return Value

string

at line 239
protected Permission createItem(array $attributes)

Create a new registered object instance

Parameters

array $attributes attributes array

Return Value

Permission