Function __global->find_commandr_fs_filename_via_id

Definitions

sources/resource_fs.php

  • Find the Commandr-fs (repository) filename from the resource ID.
  • 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_id ID_TEXT No No required parameter N/A N/A The resource ID
$include_subpath boolean No No False N/A N/A Whether to include the subpath

Returns

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

Preview

Code (PHP)

/**
 * Find the Commandr-fs (repository) filename from the resource ID.
 *
 * @param  ID_TEXT $resource_type The resource type
 * @param  ID_TEXT $resource_id The resource ID
 * @param  boolean $include_subpath Whether to include the subpath
 * @return ?ID_TEXT The filename (null: no match)
 */

function find_commandr_fs_filename_via_id(string $resource_type, string $resource_id, bool $include_subpath = false) : ?string