| 1 | <?php |
| 2 | |
| 3 | namespace Illuminate\Support\Facades; |
| 4 | |
| 5 | use Illuminate\Contracts\Auth\Access\Gate as GateContract; |
| 6 | |
| 7 | /** |
| 8 | * @method static bool has(\UnitEnum|array|string $ability) |
| 9 | * @method static \Illuminate\Auth\Access\Response allowIf(\Illuminate\Auth\Access\Response|\Closure|bool $condition, string|null $message = null, string|null $code = null) |
| 10 | * @method static \Illuminate\Auth\Access\Response denyIf(\Illuminate\Auth\Access\Response|\Closure|bool $condition, string|null $message = null, string|null $code = null) |
| 11 | * @method static \Illuminate\Auth\Access\Gate define(\UnitEnum|string $ability, callable|array|string $callback) |
| 12 | * @method static \Illuminate\Auth\Access\Gate resource(string $name, string $class, array|null $abilities = null) |
| 13 | * @method static \Illuminate\Auth\Access\Gate policy(string $class, string $policy) |
| 14 | * @method static \Illuminate\Auth\Access\Gate before(callable $callback) |
| 15 | * @method static \Illuminate\Auth\Access\Gate after(callable $callback) |
| 16 | * @method static bool allows(iterable|\UnitEnum|string $ability, mixed $arguments = []) |
| 17 | * @method static bool denies(iterable|\UnitEnum|string $ability, mixed $arguments = []) |
| 18 | * @method static bool check(iterable|\UnitEnum|string $abilities, mixed $arguments = []) |
| 19 | * @method static bool any(iterable|\UnitEnum|string $abilities, mixed $arguments = []) |
| 20 | * @method static bool none(iterable|\UnitEnum|string $abilities, mixed $arguments = []) |
| 21 | * @method static \Illuminate\Auth\Access\Response authorize(\UnitEnum|string $ability, mixed $arguments = []) |
| 22 | * @method static \Illuminate\Auth\Access\Response inspect(\UnitEnum|string $ability, mixed $arguments = []) |
| 23 | * @method static mixed raw(string $ability, mixed $arguments = []) |
| 24 | * @method static mixed getPolicyFor(object|string $class) |
| 25 | * @method static \Illuminate\Auth\Access\Gate guessPolicyNamesUsing(callable $callback) |
| 26 | * @method static mixed resolvePolicy(object|string $class) |
| 27 | * @method static \Illuminate\Auth\Access\Gate forUser(\Illuminate\Contracts\Auth\Authenticatable|mixed $user) |
| 28 | * @method static array abilities() |
| 29 | * @method static array policies() |
| 30 | * @method static \Illuminate\Auth\Access\Gate defaultDenialResponse(\Illuminate\Auth\Access\Response $response) |
| 31 | * @method static \Illuminate\Auth\Access\Gate setContainer(\Illuminate\Contracts\Container\Container $container) |
| 32 | * @method static \Illuminate\Auth\Access\Response denyWithStatus(int $status, string|null $message = null, int|null $code = null) |
| 33 | * @method static \Illuminate\Auth\Access\Response denyAsNotFound(string|null $message = null, int|null $code = null) |
| 34 | * |
| 35 | * @see \Illuminate\Auth\Access\Gate |
| 36 | */ |
| 37 | class Gate extends Facade |
| 38 | { |
| 39 | /** |
| 40 | * Get the registered name of the component. |
| 41 | * |
| 42 | * @return string |
| 43 | */ |
| 44 | protected static function getFacadeAccessor() |
| 45 | { |
| 46 | return GateContract::class; |
| 47 | } |
| 48 | } |