23 static protected $letters = [
40 public function __construct (
string $rights =
'')
42 foreach (static::$letters as $letter => $var) {
43 $this->$var = (strpos($rights, $letter) !== FALSE);
45 $this->
self = (strpos($rights,
's') !== FALSE);
48 public function toString (
bool $readOnly = FALSE):
string 50 $string = ($this->
self ?
's' :
'');
52 return $string.($this->read ?
'r' :
'');
54 foreach (static::$letters as $letter => $var) {
63 public function __toString ()
65 return $this->toString(FALSE);
70 foreach (static::$letters as $var) {
71 $this->$var = ($this->$var || $merge->$var);
75 public function isSelf ():
bool 80 public function isFull ():
bool 82 return ($this->read && $this->write && $this->create && $this->
delete && $this->move);