api/laravel/Foundation/Auth/Access/AuthorizesRequests.yaml
2024-09-26 02:03:21 -07:00

120 lines
2.5 KiB
YAML

name: AuthorizesRequests
class_comment: null
dependencies:
- name: Gate
type: class
source: Illuminate\Contracts\Auth\Access\Gate
- name: Str
type: class
source: Illuminate\Support\Str
properties: []
methods:
- name: authorize
visibility: public
parameters:
- name: ability
- name: arguments
default: '[]'
comment: '# * Authorize a given action for the current user.
# *
# * @param mixed $ability
# * @param mixed|array $arguments
# * @return \Illuminate\Auth\Access\Response
# *
# * @throws \Illuminate\Auth\Access\AuthorizationException'
- name: authorizeForUser
visibility: public
parameters:
- name: user
- name: ability
- name: arguments
default: '[]'
comment: '# * Authorize a given action for a user.
# *
# * @param \Illuminate\Contracts\Auth\Authenticatable|mixed $user
# * @param mixed $ability
# * @param mixed|array $arguments
# * @return \Illuminate\Auth\Access\Response
# *
# * @throws \Illuminate\Auth\Access\AuthorizationException'
- name: parseAbilityAndArguments
visibility: protected
parameters:
- name: ability
- name: arguments
comment: '# * Guesses the ability''s name if it wasn''t provided.
# *
# * @param mixed $ability
# * @param mixed|array $arguments
# * @return array'
- name: normalizeGuessedAbilityName
visibility: protected
parameters:
- name: ability
comment: '# * Normalize the ability name that has been guessed from the method name.
# *
# * @param string $ability
# * @return string'
- name: authorizeResource
visibility: public
parameters:
- name: model
- name: parameter
default: 'null'
- name: options
default: '[]'
- name: request
default: 'null'
comment: '# * Authorize a resource action based on the incoming request.
# *
# * @param string|array $model
# * @param string|array|null $parameter
# * @param array $options
# * @param \Illuminate\Http\Request|null $request
# * @return void'
- name: resourceAbilityMap
visibility: protected
parameters: []
comment: '# * Get the map of resource methods to ability names.
# *
# * @return array'
- name: resourceMethodsWithoutModels
visibility: protected
parameters: []
comment: '# * Get the list of resource methods which do not have model parameters.
# *
# * @return array'
traits:
- Illuminate\Contracts\Auth\Access\Gate
- Illuminate\Support\Str
interfaces: []