Function __global->absoluteise_and_test_comcode_url

Definitions

sources/comcode_renderer.php

  • Make a given URL parameter an absolute URL; Fix any errors in it; Test it.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$given_url URLPATH No No required parameter N/A N/A URL to fixup
$source_member MEMBER No No required parameter N/A N/A The member who is responsible for this Comcode
$as_admin boolean No No required parameter N/A N/A Whether to check as arbitrary admin
$tag ID_TEXT No No required parameter N/A N/A Comcode tag name

Returns

  • Fixed URL
  • Type: URLPATH
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Make a given URL parameter an absolute URL; Fix any errors in it; Test it.
 *
 * @param  URLPATH $given_url URL to fixup
 * @param  MEMBER $source_member The member who is responsible for this Comcode
 * @param  boolean $as_admin Whether to check as arbitrary admin
 * @param  ID_TEXT $tag Comcode tag name
 * @return URLPATH Fixed URL
 */

function absoluteise_and_test_comcode_url(string $given_url, int $source_member, bool $as_admin, string $tag) : string