示例#1
0
<?php

include '../src/imperium.php';
$imperium = new Imperium();
$imperium->caller(1);
$imperium->self()->allow('編輯', ['文章', '相簿']);
exit(var_dump($imperium->cannotAny('編輯', ['文章'])));
示例#2
0
 /**
  * Cannot do one of the things?
  *
  * @param array|string $actions   The name of the actions.
  * @param null|string  $resType   The type of the resources.
  * @param null|int     $resId     The identifier of the resources.
  *
  * @return bool
  */
 static function cannotAny($actions, $resType = null, $resId = null)
 {
     self::$relax = true;
     return self::cannot($actions, $resType, $resId);
 }