Function Hook_endpoint_authorization_members->run

Definitions

sources/hooks/systems/endpoint_authorization/members.php

  • Run an endpoint authorisation.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: bool

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$authorizations array No No required parameter N/A N/A Array of authorizations allowed by this call
&$member ?MEMBER Yes No required parameter N/A N/A The authorised member ID, passed by reference (null: we did not authorise to a specific member)
$hook_type ID_TEXT No No required parameter N/A N/A The endpoint hook type called
$hook ID_TEXT No No required parameter N/A N/A The endpoint hook called
$type ?ID_TEXT No No required parameter N/A N/A The type of endpoint request made (null: none)
$id ?ID_TEXT No No required parameter N/A N/A The resource ID requested in the endpoint call (null: none)

Returns

  • Whether this call is authorised; false means check other authorisation hooks if applicable or throw access denied
  • Type: boolean
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Run an endpoint authorisation.
 *
 * @param  array $authorizations Array of authorizations allowed by this call
 * @param  ?MEMBER $member The authorised member ID, passed by reference (null: we did not authorise to a specific member)
 * @param  ID_TEXT $hook_type The endpoint hook type called
 * @param  ID_TEXT $hook The endpoint hook called
 * @param  ?ID_TEXT $type The type of endpoint request made (null: none)
 * @param  ?ID_TEXT $id The resource ID requested in the endpoint call (null: none)
 * @return boolean Whether this call is authorised; false means check other authorisation hooks if applicable or throw access denied
 */

public function run(array $authorizations, ?int &$member, string $hook_type, string $hook, ?string $type, ?string $id) : bool