No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

CheckAccessInterface.php 1000B

123456789101112131415161718192021222324252627
  1. <?php
  2. /**
  3. * @link http://www.yiiframework.com/
  4. * @copyright Copyright (c) 2008 Yii Software LLC
  5. * @license http://www.yiiframework.com/license/
  6. */
  7. namespace yii\rbac;
  8. /**
  9. * @author Sam Mousa <sam@mousa.nl>
  10. * @since 2.0.9
  11. */
  12. interface CheckAccessInterface
  13. {
  14. /**
  15. * Checks if the user has the specified permission.
  16. * @param string|integer $userId the user ID. This should be either an integer or a string representing
  17. * the unique identifier of a user. See [[\yii\web\User::id]].
  18. * @param string $permissionName the name of the permission to be checked against
  19. * @param array $params name-value pairs that will be passed to the rules associated
  20. * with the roles and permissions assigned to the user.
  21. * @return boolean whether the user has the specified permission.
  22. * @throws \yii\base\InvalidParamException if $permissionName does not refer to an existing permission
  23. */
  24. public function checkAccess($userId, $permissionName, $params = []);
  25. }