Function __global->generate_resource_fs_moniker

Definitions

sources/resource_fs.php

  • Generate, and save, a resource-fs moniker.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$resource_type ID_TEXT No No required parameter N/A N/A The resource type
$resource_id ID_TEXT No No required parameter N/A N/A The resource ID
$label ?LONG_TEXT No No Null N/A N/A The (new) label (null: lookup for specified resource)
$new_guid ?ID_TEXT No No Null N/A N/A GUID to forcibly assign (null: don't force)
$definitely_new boolean No No False N/A N/A If we know this is new, i.e. has no existing moniker

Returns

  • A triple: The moniker (may be new, or the prior one if the moniker did not need to change), the GUID, the label (null: cannot)
  • Type: ?array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Generate, and save, a resource-fs moniker.
 *
 * @param  ID_TEXT $resource_type The resource type
 * @param  ID_TEXT $resource_id The resource ID
 * @param  ?LONG_TEXT $label The (new) label (null: lookup for specified resource)
 * @param  ?ID_TEXT $new_guid GUID to forcibly assign (null: don't force)
 * @param  boolean $definitely_new If we know this is new, i.e. has no existing moniker
 * @return ?array A triple: The moniker (may be new, or the prior one if the moniker did not need to change), the GUID, the label (null: cannot)
 */

function generate_resource_fs_moniker(string $resource_type, string $resource_id, ?string $label = null, ?string $new_guid = null, bool $definitely_new = false) : ?array