Function __global->find_id_via_label

Definitions

sources/resource_fs.php

  • Find the resource ID from the resource label.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

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_label LONG_TEXT No No required parameter N/A N/A The label
$subpath ?string No No Null N/A N/A The subpath (null: don't care). It may end in "/*" if you want to look for a match under a certain directory

Returns

  • The ID (null: no match)
  • Type: ?ID_TEXT
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Find the resource ID from the resource label.
 *
 * @param  ID_TEXT $resource_type The resource type
 * @param  LONG_TEXT $_resource_label The label
 * @param  ?string $subpath The subpath (null: don't care). It may end in "/*" if you want to look for a match under a certain directory
 * @return ?ID_TEXT The ID (null: no match)
 */

function find_id_via_label(string $resource_type, string $_resource_label, ?string $subpath = null) : ?string