1
0
mirror of https://github.com/flarum/core.git synced 2025-10-18 18:26:07 +02:00

added new methods etc

This commit is contained in:
Daniel Klabbers
2017-10-05 16:25:01 +02:00
parent 3f9dc81874
commit a7f3ca4b22
5 changed files with 65 additions and 33 deletions

View File

@@ -353,4 +353,51 @@ class Gate implements GateContract
{
return call_user_func($this->userResolver);
}
/**
* Register a callback to run after all Gate checks.
*
* @param callable $callback
* @return GateContract
*/
public function after(callable $callback)
{
// TODO: Implement after() method.
}
/**
* Determine if any one of the given abilities should be granted for the current user.
*
* @param iterable|string $abilities
* @param array|mixed $arguments
* @return bool
*/
public function any($abilities, $arguments = [])
{
// TODO: Implement any() method.
}
/**
* Determine if the given ability should be granted for the current user.
*
* @param string $ability
* @param array|mixed $arguments
* @return \Illuminate\Auth\Access\Response
*
* @throws \Illuminate\Auth\Access\AuthorizationException
*/
public function authorize($ability, $arguments = [])
{
// TODO: Implement authorize() method.
}
/**
* Get all of the defined abilities.
*
* @return array
*/
public function abilities()
{
// TODO: Implement abilities() method.
}
}